Linked Fonts Guide

The linked font feature allows the creation of linked typefaces using characters from two or more existing typefaces. Once created, linked typefaces are available to all users. Application developers do not need to know whether a font is a linked font or a real font.

Target audience: Device creators.

Key concepts and terms

See Font and Text Services Collection Overview.

Overview

A linked typeface can be considered a virtual typeface that has a name and consists of one or more typefaces (open fonts only). A typeface is usually made up of an alphabet of letters, numerals and punctuation marks. It may include or consist entirely of ideograms and symbols.

The following diagram represents a linked typeface that consists of characters from Chinese and English typefaces.

Figure 1. Figure 1: An example linked typeface that contains Chinese and English characters

Once a linked typeface has been successfully created, fonts can be derived from it and rasterized in just the same way as from a non-linked typeface. Similarly clients request a font from a linked typeface in the same way as from any other typeface.

Using linked typefaces reduces the ROM size because it reduces the number of font files that are required. The following table provides an example that demonstrates this.

Using standard unlinked fonts Using linked fonts

Chinese and Bold English

Chinese

Chinese and Italic English

English

Chinese and Bold Italic English

Linked Font File

Chinese and Underline English

 

A linked typeface can contain more than one complex font (for example, another linked font). The font rasterizer merges the tables required for the shaping engine.

The Canonical font

The creator of a linked typeface must specify one of the component typefaces as the principal, or canonical, typeface. If no font is specified as the canonical font, an error is returned at registration. Similarly an error is returned if more than one font is specified as the canonical font.

When a character or character metric is requested from a linked font, the real fonts that make it up are checked, one after another, in the order in which they were originally added to the linked typeface, until a match is found and the requested information can be returned. If no match is found in any of the real fonts within a linked font, the missing character glyph is supplied from the canonical font.

Typeface groups

A linked typeface must be created with at least one typeface group and each typeface must belong to a typeface group. A typeface group defines metrics applicable to all of the typefaces that it contains. The metrics are as follows:

  • Scaling Option: The different ways in which a typeface can be scaled. (None, up, down, or both up and down.)

  • Baseline Shift: Whether the font baseline can be shifted or not.

  • Boldness Percentage: How bold a bold font is.

  • Italic Angle: The angle (in percent) of italic text.

Linked typeface creation

You create a linked typeface in two stages, as shown in the following diagram. First you build up the specification. Then when the specification is complete, you register it with the Font and Bitmap Server.

Figure 2. Figure 2: The linked typeface creation process

The following diagram represents the structure of the specification for the Chinese - English example shown in Figure 1 above.

Figure 3. Figure 3: The structure of the specification for the Chinese - English example.

See Creating a Linked Typeface for more information.

Related APIs

The following table shows the linked typeface classes. They are primarily designed for the creation of device system fonts. The platform security capability ECapabilityWriteDeviceData is required to register linked typefaces. ECapabilityReadDeviceData is required to fetch linked typeface information from the Font and Bitmap Server.

Class Description

CLinkedTypefaceSpecification

The specification of a linked typeface, made up of groups and typefaces.

CLinkedTypefaceElementSpec

Specifies an individual typeface within a linked typeface.

CLinkedTypefaceGroup

Represents the typeface group. Groups have attributes that control how the rasterizer draws the typefaces within the group.