Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


Font definition file

This document describes the structure of the font definition file, including the typeface and font store file definitions.

Changes since v5

Unicode characters can be used in font name strings. Details are given below.

[Top]


Font definition file structure

A font definition file consists of a statement list, which defines typefaces and font store files.

<whole-file>
whole-file ::=
<statement-list>
<statement>
statement ::=
<typeface-statement> | <font-store-file-statement>
<typeface-statement>
typeface-statement ::=
one or more typeface definitions
<font-store-file-statement>
font-store-file-statement ::=
one or more font store file definitions

Notes

[Top]


Typeface definition

Typeface typeface-label

Name typeface-name [Symbol] [Proportional] [Serif]

FontBitmaps font-bitmap-reference-list EndFontBitmaps

EndTypeface

Description

The Typeface statement defines a typeface and gives it a label, typeface-label.

The typeface also has a full name typeface-name.

The typeface may be a symbol typeface Symbol and/or proportional Proportional and/or serif Serif. If Symbol is not stated then the typeface is normal. If Proportional is not stated then the typeface is monospaced. If Serif is not stated then the typeface is sans-serif.

A typeface contains several font bitmaps, each defined by a reference:

<font-bitmap-reference>
font-bitmap-reference ::=
<font-bitmap-label> | <uid> [WidthFactor <width>] [HeightFactor <height>]

The font-bitmap-label refers to the name of the font, as specified by the FONT statement in a BDF-format file. Alternatively, you can specify the font by UID, which must correspond to the UID of a font, as specified by the Uid keyword in the BDF file's properties section.

The font bitmap may be algorithmically enlarged by n-tupling the width using WidthFactor width, and/or n-tupling the height using HeightFactor height. This avoids the need for too many font bitmap definitions. The example below shows a normal and WidthFactor 2 character, (font: Times New Roman, 20 pixel, Bold Italic Proportional):


[Top]


Font store file definition

FontStoreFile

CollectionUid uid

KPixelAspectRatio aspect-ratio

CopyrightInfo copyright-info EndCopyrightInfo

Typefaces typeface-label-list EndTypefaces

EndFontStoreFile

Description

The FontStoreFile statement defines a destination font store file. The font store file is identified by its collection UID uid. The UID must be specified in decimal.

A font store file contains several typefaces, each defined by a typeface-label. The typeface-label refers to a previously defined typeface, in this compilation unit.

Copyright information is specified in the copyright clause — any number of lines of text, each of which must be surrounded by quotes ("), between the CopyrightInfo and EndCopyrightInfo keywords.

The aspect-ratio identifier gives the aspect ratio of the device for which the font is designed (1000*PixelHeightInTwips/PixelWidthInTwips).