@ MLS for X Window Screen Font Installation Guide by Oliver Corff, Jan. 31th, 1994 Version: 1.0 (fonts & documentation) Acknowledgements The author wishes to thank the ZEDAT (Zentraleinrichtung Datenverarbeitung) of Freie Universitaet Berlin for the as- sistance in implementing MLS in the UNIX world. Special thanks go to Mr. Hecht and Mr. Bechlars who cut out numerous hours of their work load and analysed the font server problem (TFTP or NFS?) mentioned further down. 1) Contents The MLS for X Window Package contains three mono-spaced screen fonts for terminal purposes (e.g. to be used with xterm, xgopher etc. based on X). One font (mls_8x16) is for hori- zontal display and is basically used for texts consisting mainly of Latin and/or Cyrillic characters, with only a minor portion of Classical Mongolian. Text is displayed horizontally (as usual). The second font (mls_16x8) is used for displaying text consisting basically of Classical Mongolian in combination with only a few Latin/Cyrillic text elements. The third font (mlsx1410) is a compromise in shape and direction: Latin and Cyrillic characters stand upright while Classical Mongolian characters are oriented vertically. The main purpose of this font is to dispay Mongolian text data in environments with a given user interface, e.g. gopher. All menu items can be read (impossible if mls_16x8 is installed as basic font) while Mongolian is displayed properly (as in the mls_16x8 font). It should be noted that the fonts with a 8x16 character box are "fine tuned" for a nice display appearance. The 14x10 dots character box of the bidirectional character font generates pretty wide Latin and Cyrillic characters yet the emphasis is on displaying Classical Mongolian so the latter still has an acceptable appearance. As mentioned before, the bidirectional font is a compromise! All fonts comply with the MLS codepage as defined in [1]. The font mls_16x8 is a 90 degree counter-clockwise rotated image of mls_8x16. 2) Installation There are some steps to follow until the fonts are success- fully installed, and the assistance of the system admini- strator may be needed if problems occur. Basically speaking, X is a very complex system which does not always permit to modify installations "on the fly" but it is fairly reliable once a working environment is established. a. Copy the files mls_8x16.bdf, mls_16x8.bdf and mlsx1410.bdf into the directory allocated for containing fonts. This may either be the default directory (usually /usr/lib/X11/fonts/misc or similar) or a font directory of your own choice, e.g. HOME/fonts. b. Update or make a font directory by issuing the command mkfontdir _your_font_path_containing_mls_fonts_. (Replace this with your actual pathname). After this step the directory should contain a file named fonts.dir. @ c. Since screen fonts are somewhat hardware dependant, the fonts must be compiled. Issue the following commands: bdftosnf mls_8x16.bdf > mls_h.snf bdftosnf mls_16x8.bdf > mls_v.snf bdftosnf mlsx1410.bdf > mls_b.snf If no error message is produced, then the compilation was performed successfully. d. Nonetheless, check for successful compilation by running the command showsnf mls_h.snf showsnf mls_v.snf showsnf mls_b.snf The screen should show some computerese about symbolic addresses etc. This indicates that everything is OK. Otherwise, an error message is produced. e. If your fonts reside in a different path from the default path for fonts, the font path must be added to the exist- ing path. The following command does exactly this: xset fp+ _your_font_path_containing_mls_fonts_ f. The server now must be made aware of changes in the font list. Do so by running the following command: xset fp rehash If at this stage no error message occurs, the fonts are successfully installed. If there is however an error mes- sage, then most probably the server cannot find and load the font files. X must explicitely know where the fonts reside. g. Fonts can now be invoked in three ways: 1. The menu provides a font selector 2. The font is defined when starting a client: (e.g.) xterm -fn _fontname_ 3. Fonts are called from within the document or the shell by using a terminal escape sequence. Here too, the font name must be known. h. Font names are defined in a fairly exhaustive way. See the X system documentation for a complete introduction to naming conventions. It is important to observe that font names are not identical with file names containing fonts! The full names of the three fonts are: -Corff-Fixed-Medium-R-Normal-Mongol Horizontal-16-160-75-75-C-80-MLS -Corff-Fixed-Medium-R-Normal-Mongol Vertical-8-80-75-75-C-80-MLS -Corff-Fixed-Medium-R-Normal-Mongol Bidirectional-14-140-75-75-C-80-MLS It is possible to either use the full name or to truncate most of it by using wildcards. xterm -fn *Mongol* xterm -fn *Mongol Vertical* This is a fairly clumsy way to activate fonts. Using short names or aliases to identify the fonts is much more convenient. To this purpose, your font directory contains a file named fonts.alias of simple structure. It hs two columns, the first being the short name, the second being the full name of the font. Your fonts.alias file should contain the following lines: mls_b "-corff-fixed-medium-r-normal-mongolbidirectional-14-140-75-75-c-80-mls" mls_h "-corff-fixed-medium-r-normal-mongol horizontal-16-160-75-75-c-80-mls" mls_v "-corff-fixed-medium-r-normal-mongol vertical-8-80-75-75-c-80-mls" A fonts.alias file can be created by copying a fonts.dir file. Simply replace the file names with your desired alias names. The syntax is alias WHITESPACE fontname. According to the font naming conventions a font name may contain spaces. If spaces occur, the font name MUST be included in quotation marks. (I tried only double marks - they are safe). The mkfontdir command converts capitalized font name com- ponents into all lower case spelling. It is always safe to use lower case spelling when calling fonts. The xset fp rehash command should be run after building the alias file. ERROR messages At this stage the following error message may occur: X Error of failed request:BadValue (integer parameter out of range for operation) Major opcode of failed request: 51 (X_SetFontPath) This means the X server cannot find or read your font directory, or that your directory does not look like a font directory to the server. (The mention of an "integer in the message is spurious.) The following answers are possible (the following is quoted from the publicly available document x-faq/part1): -- Is the font directory you're specifying readable from the SERVER's file system? Remember, it's the server, not the client, which interprets your font directory. Trouble in this area is especially likely when you issue an xset command with shell metacharacters in it (e.g. "xset +fp ~/myfonts") and the server is an X terminal or managed by xdm. -- Is the directory really a font directory? If you're running the sample X server (or most varieties of vendor servers) look in the directory for the file "fonts.dir". If you can't find that file, run mkfontdir(1).(If you're running OpenWindows, look for the file "Families.list". If you can't find it, run bldfamily(1).) -- If you're in a site where some people run X11Rn servers and others run a proprietary server with nonstandard font formats (OpenWindows, for example), make sure the font directory is right for the server you're using. Hint: if the directory contains .pcf and/or .snf files, it won't work for Open Windows. If the directory contains .ff and/or .fb files, it won't work for X11Rn. [thanks to der Mouse (mouse@larry.mcrcim.mcgill.edu) and to Oliver Jones (oj@pictel.com); 7/92 ] Now the fonts can be activated by running a client the following way: xterm -fn mls_h xterm -fn mls_v Aliases can also be used in escape sequences: ESC[50;_fontname_^G ESC[50;mls_v^G ESC stand for the escape code 0x1B (27d) ^G means control-G (0x7). Font installation procedures and naming conventions are discussed in detail in the X User Manual [2] (pp. 120 - 150, 575 ff. and the reference pages for each of the above-mentioned commands). Further useful commands in- clude xfontsel (to show and select fonts by picking them from a list of defined choices) and xfd (x font display). Since all clients basing on the X toolkit have standard options, the font is usually specified by using the -fn switch. BUGS A minor bug seems to occur with xfontsel. Since it gets its information apparently from the file fonts.dir (and not from the font data base in memory) xfontsel does NOT recognize the font names of fonts outside the default font directory; fonts cannot be called using the xfontsel wildcard options despite being available by that method to all clients. i. MLS fonts can be permanently installed by moving them to the default font directory and undergoing all steps men- tioned above. The setup files for your X session (.xresources and .xsession) contain lines defining de- fault fonts for startup windows and child processes. If wished, the MLS fonts can be named here and be invoked every time the startup files are referred to. 3) Using MLS Fonts No special attention has to be paid to using the horizon- tal MLS font. It behaves like any other fixed-spacing font with an upright character box. The vertically oriented font (mls_16x8) has a flat character box and should be used with a display containing a limited num- bers with as many lines as possible. A typical setup may be: xterm -geometry 32x96 -fn mls_v Instead of defining a size, it is also convenient to max- imize the focussed window. A vertical viewer (and editor) based on the X toolkit wait to be implemented. As long as they are not available a "fvp" (Fake Vertical Pager) can be used which displays the text column by column rather than line by line. Results of using this completely vertical font with some line-oriented text output do need some accomodation on the user's side hence a bidrectional compromise was developed. The bidirectional font is designed for all given user interfaces like gopher etc. where it is necessary to keep some kind of horizontal Latin/Cyrillic output while being able to show Mongolian vertically. The display geometry should be set to at 64 (if not 80) characters wide with a typical line number of 48: xterm -geometry 80x48 -fn mls_b 4) Legal status of this software and its documentation Copyright 1992/1993/1994 Dr. Oliver Corff Ulaanbaatar/Berlin corff@zedat.fu-berlin.de Permission to use, copy, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documen- tation, and that the name of Oliver Corff not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Oliver Corff makes no representations about the suitabi- lity of this software for any purpose. It is provided "as is" without express or implied warranty. Reference: [1] Oliver Corff: Mongolian Language Support - A Mongolian Language Environment for IBM compatible PCs. UNU/IIST Report No. 8, Macao 1993 @ [2] Valerie Quercia and Tim O'Reilly: X Window System Users' Guide. O'Reilly and Associates.