|
4. Installation Of TrueType Fonts |
||||||||
|
...In A Standard MorphOS EnvironmentNow that you know some interesting things about webfonts and browsers, maybe you would also like to know how to install TrueType fonts on your computer. A very good and complete tutorial, that described the use of ttf.library in the Amiga environment, was available here. This was an article of invaluable help for me several years ago when I installed TrueType fonts on my Amiga 4000/060/PPC and set them as the basic fonts in my browser. The knowledge that I acquired was useful even on the Pegasos, because ttf.library is perfectly compatible with MorphOS. I used this font engine for a few weeks on my PegasosII, until I had time to switch the whole font management to the native FreeType2 font engine included in MorphOS. The above-mentioned tutorial was upgraded by the author (Neko) in April 2000, and was republished here. Today, at the time of writing, it seems that both the websites are offline or dead. This should not be a problem for most readers, who, being Pegasos users, will be more interested to the FreeType2 font engine. In the following I provide an essential tutorial concerning the use of this native font engine of MorphOS. You will find the minimal information needed to install TrueType fonts on your Pegasos in a correct way, and a few useful details for customisation and optimisation. First of all you should create a directory where you will place your TrueType fonts, so the OS will be able to find them. There is already such a directory in your system files: SYS:MorphOS/Fonts/_ttf. However I strongly suggest that you never put new files into SYS:MorphOS (i.e. MOSSYS:), because they will be likely removed by the installation of new versions of MorphOS. Instead, the canonical way that you should follow is the creation of a new directory _ttf in SYS:Fonts, i.e. in the system area where the user can put all his files without mixing them with the operating system files. Once you have created SYS:Fonts/_ttf, copy your TrueType fonts therein: this ends the preliminary phase. Now you need to install your TrueType fonts in such a way that MorphOS and all your applications (through the OS) can use these fonts. This must be done by means of the FTManager program: double click on its icon, that you can find in SYS:Utilities. A window named "Freetype font manager" will open: it is initially empty in the upper section. In fact you must first tell to the program where are your TrueType fonts: this is done in the "Source" line in the bottom part of the window. You can type directly SYS:Fonts/_ttf therein, or click on the relevant disk button and select that directory by means of the requester. Once you have pressed the <RETURN> key, the program will read and analyse all the TrueType font files present in the specified directory and will list them in the upper part of its window. If there are many TrueType font files in SYS:Fonts/_ttf, this process will require some time. In the meanwhile you can pay attention to the second and third line below. The "Destination" line is needed to specify the directory where the .font and .otag files generated by the installation process will be stored. You will find already the default destination Fonts: therein: do not change it, in a normal system this means that those files will be saved to SYS:Fonts. Finally, in the "Codepages" line, you should type the name of the mapping file you want to use for your TrueType fonts. You can leave empty this field (in such a case the system will use a suitable default), or you can select the file you prefer within the relevant directory, that is SYS:MorphOS/Fonts/_codepages. The (readable) text files you will find there specify the mapping of several standard 256-character fonts into Unicode. I use the CP1252.TXT codepage, you can prefer other files; if you are in doubt, do not fear and leave empty the "Codepages" line. If you choose explicitly the codepage, the relevant mapping is forced and embodied in all the .otag files that will be generated. Otherwise, no mapping is included in .otag files and, when a TrueType font will be loaded, the default codepage for your language will be loaded and used. Now you should see something like this:
![]() Double click on a TrueType font in the list, for instance arial.ttf. A new window like this will open:
![]() In your first try, you can leave everything like it is by default, press the "Install" button, and close the installation window. As a consequence of these actions, two new small files are created and saved to Fonts:. In our example their filenames will be arialregular.font and arialregular.otag: their presence ensures that, from now on, the OS will be aware of the existence of the arial font (the regular suffix is added by default to the font name, and specifies the plain or Roman font style). You can do a very fast installation of all your TrueType fonts just double-clicking on each font in the list window, pressing "Install" in the installation window, and closing this window. Now you only need a word processor or a font viewer: choose your new fonts, display them, and judge their aspect. It is possible that you dislike something in the aspect of your fonts, so maybe you could need some kind of customisation. In the previous picture it is evident that many distinct actions are possible for this purpose in the installation phase. The biggest problems for unskilled persons arise now, because they are not able to judge what action is needed for a specific effect. My explanations will cover only two actions that can be useful for changing the most important aesthetic properties of TrueType fonts. If you would like to know more, please note that TrueType font installation is so fast that you can simply experiment with all possible parameters and discover what happens when they are modified. Change one parameter at a time in the installation window and see the results with a suitable font viewer (changes become effective after a reset). Most times you will have no visible results, sometimes there will be weird effects, but the results of a few modifications may be nice and useful. The selection of a "Metric" is the most important choice for an user that tries to customise TrueType fonts on his system. The metric manages the amount of blank space that will surround each glyph of a font in the rectangular area that will be used for rendering that glyph. Looking at the same glyph of the same font rendered with distinct metrics, the most relevant effect perceived by an unskilled eye is a different vertical positioning and size of the glyph. The default metric, "Global bounding box", creates the largest blank space around each glyph, so you will see smaller glyphs with a larger vertical spacing. The metric most compatible with classic Amiga computers (where ttf.library is available for TrueType font display) is "Raw font metric". The effect you will perceive selecting this metric is the rendering of larger glyphs with less vertical interspace. For our present purposes, i.e. obtaining the best visual results with Amiga browsers on the Pegasos, the most convenient metric for cloning the font rendering of Mozilla/Firefox is "USWin ascender". This generates glyphs with size and vertical spacing intermediate between the results of the previously mentioned metrics. Please note that not all the rendering choices are perfect, although they may seem good at first sight. On Amiga-like computers the font baseline is not set by the libraries that manage TrueType fonts, but is inferred by diskfont.library directly from glyph descriptions. So you can find that, for certain font sizes, the letters in a line of text are displayed with a straight baseline, while, for other sizes, the same line of text is displayed with a jumping baseline. Since MorphOS diskfont.library is different from AmigaOS diskfont.library, the usual choice for the Amiga ("Raw font metric", that however exhibits some jumps with large fonts) is not always perfect on the Pegasos, too. On the other hand I never had baseline problems on the Pegasos with the "USWin ascender" metric, that I strongly recommend for your TrueType font customisation. Once you have obtained glyphs whose size, vertical spacing, and horizontal alignment are optimal, your problems are not finished. You can find that the horizontal spacing between adjacent glyphs is not optimal for your purposes or your aesthetic tastes. For instance I do not like the large horizontal interspace between glyphs of monospace fonts (Andale Mono and Courier New) that is generated by the default values that appear in the installation window of FT2Manager. A possible way to reduce this interspace is a reduction of the numerical value shown in the "Space width" line. I reduced by 1000 the default value displayed for monospace fonts, and obtained a better result (please note that this is only a matter of taste, not a canonical rule). A typical question that novices ask at this stage is the following: "OK. Now I know the basics of what I must do to install my TrueType fonts... But what fonts must be installed?". Well, the standard minimal set should be formed by all the main webfonts mentioned in this section. The filenames of these basic webfonts are: andalemo.ttf, arial.ttf, ariblk.ttf, comic.ttf, cour.ttf, georgia.ttf, impact.ttf, times.ttf, trebuc.ttf, verdana.ttf, webdings.ttf. Other pseudo-webfonts that you can use, if you are able to find them, are: arialn.ttf, lsansuni.ttf, symbol.ttf, tahoma.ttf, wingding.ttf, wingdng2.ttf, wingdng3.ttf (note that there are three distinct Wingdings fonts). But remember that the presence of these TrueType fonts in your system is not a necessity, but only matter of personal convenience. You should note that in the webfont archives there are other files with names similar to the basic webfonts listed above. Their names are the same except for the insertion of the letters "b" or "bd", "i", and "bi" or "z" before the .ttf qualificator (these are abbreviations respectively for bold, italic, and bold-italic). The existence of these additional files reflects a property of TrueType font management on other platforms that has not yet an equivalent in Amiga-like environments. Truetype fonts are collected in style families. For example, the Arial font is formed by four style families: arial.ttf, arialbd.ttf, ariali.ttf, arialbi.ttf. In other terms, there are separate font files for the glyphs of plain Arial, bold Arial, italic Arial, and bold-italic Arial. In other OS's, if a program that uses Arial fonts needs, say, italic style glyphs, it will receive automatically the relevant glyphs extracted from the specific font file. In such a way the display of texts gains the maximum elegance because the glyphs of each style are typographically optimized for the best appearance, independently from the glyphs of other styles. In all the Amiga-like environments, style families are simply ignored. In fact, styles are generated by the OS, that modifies plain glyphs on the fly. A bold glyph is created by replicating the glyph image after a small horizontal translation; italic is created by applying slightly different horizontal translations to each horizontal line of pixels of the glyph. This behaviour was effective in early times, when there was a limited amount of RAM available for storing all the fonts loaded, but today this is irrelevant and gives less elegant results. Furthermore, technically speaking, we must also say that the real italic style never existed (and still does not exist) on Amiga-like computers: indeed the above-mentioned algorhythm actually generates slanted style glyphs (if you do not imagine the difference, just compare plain, italic, and slanted characters in the picture below). The previous arguments seems to imply that you may avoid the installation of other styles besides the plain webfonts listed above. Indeed, your current browser will not be affected by this. Anyway, note that if you install style families of TrueType fonts, you will be able to use them at least in your favorite word processor. For instance, assume that you are using plain Times New Roman, and want to emphasize a sentence using italic style. Instead of using the word processor function that let the OS generate italic glyphs, you can specify to the word processor that the Times New Roman Italic font must be used for that sentence. The result will be much more elegant, as you can see in the following picture, grabbed and cropped from the screen of Wordworth.
![]() |
||||||||
|
|
||||||||