Mighty Pegasos Mighty MorphOS

2. The Nature Of Fonts

Fonts & Browsers
DoctorMorbius_FP

1. Introduction 2. The Nature Of Fonts 3. Amiga Browsers 4. Installation Of TrueType Fonts
5. Cloning Firefox Webfonts 6. AWeb Enhancement 7. Final Remarks

Bitmap Fonts

In the beginning there was Johannes Gutenberg. His fonts were properly shaped wooden blocks, and the printing process was formed by two phases: putting together all the blocks needed for the composition of a typographical page, and transferring ink to a paper page pressed on the inked blocks. Early fonts were hardware objects, and this basic structure remained unchanged for centuries.

Then, a few dozen years ago the computer age begun, and the nature of fonts changed. They became the very essence of the concept: pure software structures containing size and shape information. The task of managing these structures was assigned to other software (drivers), and the task of displaying them was reserved to specific hardware tansducers (monitors, printers).

A font is a set of glyphs representing letters, numbers, and other characters useful for the creation of a text. The simplest data structure that can represent a single glyph is a bitmap, that is an array whose elements are 1 or 0. This is the origin of the name bitmap fonts that specifies early computer fonts. If you represent the virtual array of a glyph by means of a real array of little squares on paper, and mark with black ink the 1's and leave blank the 0's, you will reproduce the glyph. All the rest (i.e. putting the array in a certain position on the paper, using specific sizes and colors, etc.) is only a matter of technology...

Actually, the typographer who creates a font is an artist, who is only interested in the creation of elegant shapes for the glyphs. The common graphic features of a set of coherent glyphs define the style and family of a font. Let us start our considerations from the concept of font families.

Early fonts (included Gutenberg's fonts) were an imitation of hand-writed characters, so their glyphs were enriched by (calli)graphic embellishments that do not contribute to the identification of a character, but only to its general aspect. All the fonts having such a glyph structure are called serif fonts (or serifed fonts): a serif is a flick added to the tips of the lines that make up the glyphs.

After centuries of typographic art evolution that explored and established uncountable font properties and defined the taste and appreciation of millions of readers, it is not strange that early computer fonts were direct transpositions of commonly used book fonts. Those who are old enough probably remember that basic fonts of early IBM PC's were serif fonts. The well known topaz.font of Amiga computers also was a serif font up to AmigaOS 1.3. Since AmigaOS 2.0 the name remained the same, but Topaz became a sans-serif font. Serif and sans-serif are French words, and sans means without: so you may imagine easily what is the aspect of a sans-serif font.

Why Commodore changed the family of Topaz fonts from serif to sans-serif? The answer is that it was clear by then, to all the people who worked on computers, that the highest number of details of serif fonts make them more beautiful but less readable than sans-serif fonts, at least with the typical resolutions of a monitor display. The reverse is true on paper, because printers have resolutions higher than monitors. This is a general rule of thumb: you always achieve the highest readability by using serif fonts for printing and sans-serif fonts for video display.

Serif and sans-serif are two large families that collect most fonts, but not all. There is also an intermediate family with less elaborate serifs: slab-serif fonts.

Anyway, there are many other families of fonts that combine and overlap with the above-mentioned ones. For instance, all the fonts can be partitioned in two main families: proportional fonts and monospace fonts. A proportional font has glyphs of distinct width (like in the three pictures above), while all the glyphs of a monospace font have the same fixed width.

A single font can spread into a family of strictly similar fonts through small size and thickness changes. This is an example:

A single font can spread into a group of strictly similar fonts even by means of specific canonical shape changes of the glyphs. All the fonts obtained are different styles of the original font. In the following picture you will see the basic style (plain or Roman) of a font and some of the most used secondary styles.

Other secondary styles can be obtained by mixing the styles shown above, so you can have bold-italic, bold-underlined, bold-italic-underlined, and so on.


Vector Fonts

One of the major needs for people when they use fonts in applications like word processors and browsers is the availability of several sizes of the same font. For a bitmap font this means that the designer of the font has to create several virtual arrays of different sizes representing each glyph of his font. This is possible but takes time, and usually is a boring task for font designers. On the other hand a solution exists on the users' side, because the power of their computers can be used to generate new font sizes by means of automatic scaling. This means that the computer, starting from the existing virtual arrays corresponding to a specific size of the font, calculates totally new, smaller or larger, virtual arrays for each glyph of the font.

This operation is fast and efficient, but has a number of drawbacks. When the font size that the user wants to create is too small or too large in comparison with the starting font size, the glyphs accumulate imperfections. These undesired effects are enhanced if the existing start size of the font is small and contains raw data on the shape of glyphs. Details are lost in the reduction phase, or are deformed in the enlarging phase; alias effects distorct the glyphs (e.g. sloped lines appear as sequences of steps); and so on.

So people started to think about this problem, searching for more suitable methods to store glyph information in a reasonable file size. The result was the invention of vector fonts. These fonts do not contain data on the position of single pixels (points, in the typographic language) of a glyph. On the contrary they contain data on the straight lines and the curves that make up a font, such as slopes, proportions, and relative positions. No absolute data are provided, since each glyph of any font size is created via a three-step or four-step procedure:

  • data that describe the glyph are loaded and properly assembled into a vector image;
  • the whole vector information is scaled to the required size;
  • a bitmap of the glyph is created, corrected, optimized, and drawn in the required virtual array;
  • in case anti-aliasing is active, 256 grey tones are used to paint the glyph in the virtual array, just to reduce to a minimum every stepping effect on sloped lines.
Other additional data possibly present in the font file may suggest optimal computation strategies to the scaling algorhythm in case of generation of very small or very large font sizes.

In view of all the previous requirements, it is evident that the rendering of vector fonts requires high computing power. On the other hand, their ultimate advantage is the high quality of all rendered glyphs, which is almost independent from their sizes.

A number of vector fonts were distributed on the market: they were used soon in word processors and DTP programs, and the results were so good that in the end their management was embodied in every OS. The first vector fonts used on the Amiga were Compugraphic fonts, that are managed by the outline font engine introduced by Commodore with its bullet.library. Management of the most recent TrueType fonts was made possible on the Amiga by Richard Griffith with a compatible font engine named ttf.library. On the Pegasos, the font engine used by MorphOS is a port of the FreeType2 font engine available here. This outline font engine manages both compugrapic and truetype fonts (and other formats, too): its main components within MorphOS are freetype.library and ft2.library.

The TrueType font engine ttf.library V0.8.5 for classic Amigas is available on Aminet in the util/libs directory, under the following archive name: ttflib680x0.lha (where x = 0, 2, 3, 4, or 6 according to your 68k processor).


Webfonts

You should not be fooled by the name webfonts. These are fonts like all the others. They only have a special history that I will briefly report below. At the same time I will also describe several other things that you should know about fonts on the web. And of course I will tell you about the special places where webfonts can still be found today, if you do not know them already.

Let our short story begin: "Once upon a time Microsoft distributed a free set of selected fonts they called core fonts for the web..."

Was this an extraordinary burst of generosity? Maybe Microsoft falled in love with us all? Well, there is a widely spread statement about plans that, like Murphy's law, gives us some general rules useful for an interpretation of facts. This statement says that basically there are four kinds of plans.

1) Brief term plans
These are usually done by normal people who, having few money, cannot afford projects that look at the distant future.
2) Mid term plans
These are a matter of politicians, who just need to be re-elected after a few years.
3) Long term plans
These are done by multinational organisations, for which future money and power are more important than the lot of money and power they already have now.
4) Millennial plans
These are an exclusive competence of religions, whose (unsaid) goal is current and future control of all human minds.
It is clear that our present question about Microsoft can be classified in the third class. At least now... Indeed several people think that Bill Gates would like to drive a transition to the fourth class.

Of course, when the core fonts for the web became freely available, there were some correlated and largely shared needs. It was already clear to people involved that the web should look better for achieving popular success. But early browsers had few fonts for displaying web pages, so a sort of uniformity of texts was a distributed defect. The minimal browser outfit was formed by one proportional font and one monospace font; sometimes proportional fonts were two, one serifed and the other sans-serif. Fonts were a local matter because there were few multiplatform fonts. On different platforms most fonts had either the same name but distinct looks, or distinct names and a similar look. Web designers were not able to create pages with a really universal typographic aspect. So the proposal of a set of fonts that could be used on every computer, achieving an equal well-known look, was an idea that people largely accepted in a brief time.

There were also other requirements. Fonts should have a large visual dynamics, with sizes ranging through the seven step scale managed by HTML. Moreover, all these sizes should be easily adaptable to different display resolutions. In fact, higher resolutions give best results with fonts having larger sizes and detailed graphic aspect. These fonts are not suitable for lower resolutions, where they appear too big. The most important property of fonts for lower resolutions must be a high readability even when they are displayed with a small number of (typographical) points. With such clashing requirements, the use of scalable vector fonts became a mandatory choice.

So Microsoft core fonts for the web were TrueType fonts, chosen in such a way that a large collection of families, shapes and styles was available. They were (see here for more details):

  • Andale Mono     (monospace;    sans-serif; plain)
  • Arial           (proportional; sans-serif; plain, bold, italic, b-i)
  • Arial Black     (proportional; sans-serif; plain)
  • Comic Sans MS   (proportional; sans-serif; plain, bold)
  • Courier New     (monospace;    slab-serif; plain, bold, italic, b-i)
  • Georgia         (proportional; serif;      plain, bold, italic, b-i)
  • Impact          (proportional; sans-serif; plain)
  • Times New Roman (proportional; serif;      plain, bold, italic, b-i)
  • Trebuchet MS    (proportional; sans-serif; plain, bold, italic, b-i)
  • Verdana         (proportional; sans-serif; plain, bold, italic, b-i)
  • Webdings        (proportional; graphic;    plain)

Of course, the major need implied by these webfonts was the use of browsers capable of multiple font management.

Other fonts were also available, and often are considered webfonts, although Microsoft did not insert them explicitly among the core fonts for the web. Some of these additional fonts are:

  • Arial Narrow        (proportional; sans-serif; plain, bold, italic, b-i)
  • Lucida Sans Unicode (proportional; sans-serif; plain)
  • Symbol              (proportional; serif;      plain)
  • Tahoma              (proportional; sans-serif; plain, bold)
  • Wingdings           (proportional; graphic;    plain)
  • Wingdings 2         (proportional; graphic;    plain)
  • Wingdings 3         (proportional; graphic;    plain)

Also the encoding of computer fonts quickly evolved due to web requirements. The glyphs manageable with the 7-bit addressing scheme of the early ASCII standard and its 8-bit generalisations were too few for the world wide web and its multiethnic population. With 8 bits you can construct a pointer to the glyph that you want to select in your font file, but there are only 256 choices, and these are enough only for specific (western) alphabets. The introduction of UCS and Unicode (see, for instance this well-known document), with a 32-bit (and more) addressing scheme, made possible a universal representation of all the glyphs of all the languages (modern, ancient, and also invented by artists, like Tolkien's elfic idioms) of the whole planet. This is another field where Amiga-like computers are outdated, since they are still bounded to a 256-character set, and can only use a prefixed subset of glyphs at a time from any unicode font.

A consequence of unicode introduction was that some fonts, like for instance the Symbol font listed above (that contains Greek characters), became obsolete on other computer platforms. In fact, Greek letters may be embodied in every unicode font file, as well as Cyrillic, Arabic, Hebrew, Chinese, Japanese, and so on.

This short story ends with the final action by Microsoft, that (after TrueType core fonts for the web became the established standard webfonts) decided that these fonts should be no longer available for download in its web site (see here). Of course they are still available if you buy Windows and a number of other Microsoft products. The reason for this action is a matter that I leave to your judgement.

Although the webfonts are no longer available on Microsoft's web site, they can be found in several places on the web. You can find some early versions (1996) even on Aminet in the file text/font/WebFonts.lha (this archive includes Arial, Comic Sans MS, Courier New, Impact, Times New Roman). Anyway, the most convenient site for downloading all the webfonts is SourceForge, where the latest freely distributable versions are available here. You should download the files: andale32.exe, arial32.exe, arialb32.exe, comic32.exe, courie32.exe, georgi32.exe, impact32.exe, times32.exe, trebuc32.exe, verdan32.exe, webdin32.exe.

These files are still in their original Microsoft format, that is CAB archives in .exe format. The extraction of actual webfonts from these archives can be done by means of the CABextract utility from Aminet (util/arc/cabextract.lha) or the XAD unarchiving package and (if you cannot live without a GUI) its Voodoo-X interface (the relevant archives are available on Aminet in util/arc).

From each archive you will extract TrueType font files (their filenames end with .ttf), and possibly some .dll, .exe, .inf, and/or .txt files (all these files can be thrown away). Each archive contains the complete style family (if any); e.g. from arial32.exe you get: Arial.TTF, Arialbd.TTF, Arialbi.TTF, Ariali.TTF.

It is evident that you can find updated versions of most webfonts in any Windows installation. These are the directories where webfonts can be found and the relevant filenames:

Windows 98
Directory: C:\WINDOWS\FONTS\
Filenames of plain fonts: arial.ttf, ariblk.ttf, comic.ttf, cour.ttf, impact.ttf, times.ttf, trebuc.ttf, verdana.ttf, webdings.ttf; arialn.ttf, symbol.ttf, tahoma.ttf, wingding.ttf.
Filenames of style fonts: arialbd.ttf, arialbi.ttf, ariali.ttf, ariblki.ttf, comicbd.ttf, courbd.ttf, courbi.ttf, couri.ttf, timesbd.ttf, timesbi.ttf; timesi.ttf, trebucbd.ttf, trebucbi.ttf, trebucit.ttf, verdanab.ttf, verdanai.ttf, verdanaz.ttf.
Notes: "Andale Mono" (andalemo.ttf), "Georgia" (georgia.ttf, georgiab.ttf, georgiai.ttf, georgiaz.ttf), and "Lucida Sans Unicode" (lsansuni.ttf) not available; italic "Arial Black" (ariblki.ttf) added.
Windows 2000
Directory: C:\WINNT\FONTS\
Filenames of plain fonts: arial.ttf, ariblk.ttf, comic.ttf, cour.ttf, georgia.ttf, impact.ttf, times.ttf, trebuc.ttf, verdana.ttf, webdings.ttf; arialn.ttf, symbol.ttf, tahoma.ttf, wingding.ttf.
Filenames of style fonts: arialbd.ttf, arialbi.ttf, ariali.ttf, ariblki.ttf, comicbd.ttf, courbd.ttf, courbi.ttf, couri.ttf, georgiab.ttf, georgiai.ttf, georgiaz.ttf, timesbd.ttf, timesbi.ttf; timesi.ttf, trebucbd.ttf, trebucbi.ttf, trebucit.ttf, verdanab.ttf, verdanai.ttf, verdanaz.ttf.
Notes: "Andale Mono" (andalemo.ttf) and "Lucida Sans Unicode" (lsansuni.ttf) not available.
Windows XP
Directory: C:\WINDOWS\FONTS\
Filenames of plain fonts: same as above.
Filenames of style fonts: arialbd.ttf, arialbi.ttf, ariali.ttf, comicbd.ttf, courbd.ttf, courbi.ttf, couri.ttf, georgiab.ttf, georgiai.ttf, georgiaz.ttf, timesbd.ttf, timesbi.ttf; timesi.ttf, trebucbd.ttf, trebucbi.ttf, trebucit.ttf, verdanab.ttf, verdanai.ttf, verdanaz.ttf.
Notes: "Andale Mono" (andalemo.ttf) not available. "Lucida Sans Unicode" (lsansuni.ttf) substituted by "Lucida Sans" (lsans.ttf, lsansd.ttf, lsansdi.ttf, lsansi.ttf).
Notes
Some filenames in the three OS's covered above are randomly written (completely or in part) with capital letters, but this is totally irrelevant.
The files giorgiaz.ttf and verdanaz.ttf are bold-italic fonts with "z" instead of "bi" in the filename (crazy effects of the early 8+3 format for filenames).

Of course I'm reporting these data exclusively to let you know and satisfy your curiousity. It must be clear that I'm not suggesting that you should rip off these files from a Windows installation. This action may be illegal even if Windows is installed on one of your own computers.