Appendix C: Implementation and performance notes


  1. Order of property value calculation
  2. Colors
    1. Gamma Correction
  3. Fonts
    1. Glossary of font terms
    2. Font retrieval
    3. Meaning of the Panose Digits
    4. Deducing Unicode Ranges for TrueType

3.1 Order of property value calculation

This section is under construction

Due to dependencies among properties, user agents must compute some property values in a specific order.

3.2 Colors

3.2.1 Gamma Correction

The following information is informative, not normative. See the Gamma Tutorial in the PNG specification [PNG10] if you aren't familiar with gamma issues.

In the computation, UAs displaying on a CRT may assume an ideal CRT and ignore any effects on apparent gamma caused by dithering. That means the minimal handling they need to do on current platforms is:

PC using MS-Windows
Unix using X11
Mac using QuickDraw
apply gamma 1.39 [ICC32] (ColorSync-savvy applications may simply pass the sRGB ICC profile to ColorSync to perform correct color correction)
SGI using X
apply the gamma value from /etc/config/system.glGammaVal (the default value being 1.70; applications running on Irix 6.2 or above may simply pass the sRGB ICC profile to the color management system)
NeXT using NeXTStep
apply gamma 2.22

"Applying gamma" means that each of the three R, G and B must be converted to R'=Rgamma, G'=Ggamma, B'=Bgamma, before handing to the OS.

This may rapidly be done by building a 256-element lookup table once per browser invocation thus:

  for i := 0 to 255 do
    raw := i / 255;
    corr := pow (raw, gamma);
    table[i] := trunc (0.5 + corr * 255.0)

which then avoids any need to do transcendental math per color attribute, far less per pixel.

3.3 Fonts

3.3.1 Glossary of font terms

Bitstream's DocLock™ technology ensures that TrueDoc PFRs can only be used with the site they are published for. A TrueDoc PFR moved to a different site or referenced from another site will not work.
Digital Signature
Part of a trust management technology, used to provide signed assertions about a resource.
Font Caching
Font caching allows for a temporary copy of fonts on the client system. They are often stored on disk with other cached items such as graphics specifically for the UA.
Font Face
A "handle" that refers to a specific face of a font, excluding the font size (? size may be needed for non-scalable fonts)
Font Matching
Font matching is a process of selecting a similar font based on using one or more attributes of the primary font. Common attribute include serif, sans serif, weight, cap height, x height, spacing, language, and posture. Font matching is dependent on the algorithm and the variety of candidate fonts.
Glyph Representation Sub-setting
Glyph Representation sub-setting is the process by which unwanted glyph representations, (together with their side bearings and kerning information) are removed from a primary font to produce a smaller subset font that covers a particular document or set of documents. This is a particular win for documents that use ideographic scripts, where the glyph complement of the base font can be very large. Glyph representation sub-setting for documents using scripts that require ligatures, such as Arabic, is difficult without knowing the ligature formation rules of the final display system.
Intellifont technology was developed by Agfa and is the native format for Hewlett-Packard and other printers that use the PCL5 language. It is also the native font format on the Amiga computers.
A font synthesis technique which, given a Panose-1 number (and, optionally, additional font description data) can generate a faux font without extrapolating from a single master outline or interpolating between two or more outlines. See [INFINIFONT].
A class of letter forms for Latin scripts, that are more cursive than roman letter forms but less so than script forms. Often, a pair of fonts are designed to be used together; one is a serifed roman and one is italic. Other terms to describe this class of letter forms include cursive and, for Cyrillic scripts, kursiv. For sans-serif faces, the companion face is often a slanted or oblique variant rather than a different class of letter form.

Italic forms

Altering the spacing between selected glyph representations, which would otherwise appear to be too close or too far apart, to obtain a more even typographical color.

Illustration of kerning

Multiple Master Font
A Multiple Master Font contain two primary fonts that are used with special rendering software to provide an interpolated result. Adobe Systems provides a mechanism that allows for parameters to be used to control the output or the interpolated output font. These parameters generally describe the characteristics of an original font and the multiple master result is referred to as a "synthesized font."
Open Type
Open Type is an extension to the TrueType font format which contains additional information that extends the capabilities of the fonts to support high-quality international typography. Open Type can associate a single character with multiple glyph representations, and combinations of characters with a single glyph representation (ligature formation). Open Type includes two-dimensional information to support features for complex positioning and glyph attachment. TrueType Open contains explicit script and language information, so a text-processing application can adjust its behavior accordingly. See [OPENTYPE].
Server Font
A Server Font is a font resource located on the web server that is referenced by the WebFont definition. The user agent may use this resource for rendering the page.
Speedo font technology was developed by Bitstream and is the native font format on the Atari ST and Falcon computers,. It is also used by computers running X.
TrueDoc technology was developed by Bitstream for the creation, transport, and imaging of platform independent scalable font objects on the web. Creation of font objects is done by the TrueDoc character shape recorder (CSR) and the rendering of the font objects is done by TrueDoc's character shape player (CSP). The technology is intended to be used on the web for viewing and printing.
TrueDoc Portable Font Resource
A TrueDoc Portable for resource (or PFR) is a platform independent scalable font object which is produce by a character shape player. Input may be either TrueType or Type 1 of any flavor on either Windows, Mac, or Unix. TrueDoc Portable Font Resources provide good compression ratios, are platform independent, and because they are not in an native font format (TrueType or Type 1) they can not be easily installed.
TrueType is a font format developed by Apple and licensed to Microsoft. TrueType is the native operating system font format for Windows and Macintosh. TrueType contains a hierarchical set of tables and glyph representations. Characters can be hinted on a per character and point size basis yielding excellent quality at screen resolutions. TrueType fonts for Windows and Mac have few differences, though they can be different enough to prevent cross platform usage. Font foundries provide TrueType fonts for each platform and generally include a license preventing electronic manipulation to achieve cross platform transparency.
TrueType Collection
A TrueType Collection (or TTC) is an extension to the TrueType format that includes tables that allow for multiple TrueType fonts to be contained within a single TrueType font file. TrueType collection files are relatively rare at this time.
TrueType GX Fonts
TrueType GX Fonts contain extensions to the standard TrueType format that allow for mutable fonts, similar to Multiple Master fonts. There may be several mutation axis such as weight, height, and slant. The axis can be defined to obtain almost any effect. TrueType GX can also supports alternate glyph representation substitution for ligatures, contextual forms, fractions, etc. To date, TrueType GX is available only on the Mac. See [TRUETYPEGX].
Type 1 font
Type 1 fonts, developed by Adobe Systems, were one of first scalable formats available. Type 1 fonts generally contain 228 characters with the glyph representations described using third degree bezier curves. Mac, Windows, and X have similar but separate formats; Adobe provides Adobe Type Manager for all three platforms. Type1c is a more recent losslessly-compressed storage form for Type 1 glyph representations.
URI Binding
A process of locking a particular font resource to a given Web site by embedding an encrypted URI or a digitally signed usage assertion into the font resource.

3.3.2 Font retrieval

There are many different font formats in use by many different platforms. To select a preferred font format, transparent content negotiation is used (see [NEGOT]). It is always possible to tell when a font is being dereferenced, because the URI is inside a font description. Thus, only the relevant Accept headers need be sent (not headers related to images, HTML, etc).

3.3.3 Meaning of the Panose Digits

For further details on Panose-1, see [PANOSE].

Serif Style
Stroke Variation
Arm Style

3.3.4 Deducing Unicode Ranges for TrueType

This information is available in the font by looking at the 'ulUnicodeRange' bits in the 'OS/2' table (if it has one), which holds a bitfield representation of the set. This table is defined in revision 1.66 of the TrueType specification, from Microsoft. Considering this information as a set, each element corresponds to a Unicode 1.1 character block, and the presence of that element in the set indicates that the font has one or more glyph representations to represent at least one character in that block. The set has 128 elements as described below. The order generally follows that in the Unicode 1.1 standard. This table may be used to convert the information in a TrueType font into a CSS 'unicode-range' descriptor.

BlockAddBlock nameUnicode range

01Basic LatinU+0-7F
12Latin-1 SupplementU+80-FF
24Latin-1 Extended-AU+100-17F
38Latin Extended-BU+180-24F

41IPA ExtensionsU+250-2AF
52Spacing Modifier LettersU+2B0-2FF
64Combining Diacritical MarksU+300-36F

81Greek Symbols and CopticU+3D0-3EF

121Hebrew Extended-A
Hebrew Extended-B
?? what ranges ??
144Arabic ExtendedU+670-6FF



278Georgian ExtendedU+10F0-10FF ??

281Hangul JamoU+1100-11FF
292Latin Extended Additional-
304Greek ExtendedU+1F00-1FFF
318General PunctuationU+2000-206F

321Superscripts and Subscripts-
332Currency SymbolsU+20A0-20CF
344Combining Marks for SymbolsU+20D0-20FF
358Letterlike SymbolsU+2100-214F

361Number FormsU+2150-218F
384Mathematical OperatorsU+2200-22FF
398Miscellaneous TechnicalU+2300-23FF

401Control PicturesU+2400-243F
412Optical Character RecognitionU+2440-245F
424Enclosed AlphanumericsU+2460-24FF
438Box DrawingU+2500-257F

441Block ElementsU+2580-259F
452Geometric ShapesU+25A0-25FF
464Miscellaneous SymbolsU+2600-26FF

481CJK Symbols and PunctuationU+3000-303F

521Hangul Compatibility JamoU+3130-318F
532CJK Miscellaneous??
544Enclosed CJK Letters and MonthsU+3200-32FF
558CJK compatibilityU+3300-33FF

598CJK Unified IdeographsU+4E00-9FFF

601Private Use AreaU+E000-F8FF
612CJK Compatibility IdeographsU+F900-FAFF
624Alphabetic Presentation FormsU+FB00-FB4F
638Arabic Presentation Forms-AU+FB50-FDFF

641Combining Half MarksU+FE20-FE2F
652CJK compatibility FormsU+FE30-FE4F
664Small Form VariantsU+FE50-FE6F
678Arabic Presentation Forms-BU+FE70-FEFF

681Halfwidth and Fullwidth FormsU+FF00-FFEF

The TrueType bitfield system has the problem that it is tied to Unicode 1.1 and is unable to cope with Unicode expansion - it is unable to represent Tibetan for example.