Symbian
Symbian OS Library

FAQ-1264 Why does my font file work on some Symbian OS phones and not others?

[Index][spacer] [Previous] [Next]



 

Classification: General Category: Fonts & Bitmaps
Created: 04/15/2005 Modified: 05/20/2005
Number: FAQ-1264
Platform: Not Applicable

Question:
What font formats can be supported in the Open Font System? What is the GDR font format?
How can I convert from my unsupported font type to a supported font type? Why doesn't my GDR font work?


Answer:
Symbian OS provides the "Open Font System"; a framework that allows font rasterizers to be written and installed to support a particular font format. The Open Font System is a mandatory component, and is hence present on all phones.

A font rasteriser written for the Open Font System must be present to support fonts other than "GDR" (see below) fonts.

Why does my TrueType font work on some Symbian OS phones and not others?
Symbian has ported the open-source "FreeType" font rasterizer to the Open Font System, enabling rendering of TrueType fonts. However the FreeType plug-in is an optional component, and therefore may not be present or supported by a handset manufacturer on a particular phone.

Symbian provides a patch for the missing rasterizer on Symbian OS v7.0-based phones. This is available from the Symbian Developer Network (DevNet), see heading "Support for TrueType Fonts" at http://www.symbian.com/developer/development/syslibs.html. This patch has also been shown to work on Symbian OS v6.1 based phones, but has not been tested on later versions of Symbian OS.

For more information on the Open Font System, see:
» Developer Library » Symbian OS Guide » C++ API guide » Application Framework » Using Open Font System

What font formats can be supported in the Open Font System?
The Open Font System supports all font types through plug-in rasterizers. However, there is no guarantee that any rasterizer will be pre-installed on a particular phone.

The FreeType plug-in provides support for TrueType fonts. A number of other 3rd parties rasterizer plug-ins to the Open Font System are either available or in development. These will support a range of other font types.

Symbian also supports a native font format. Symbian's "GDR" fonts are produced using the FNTTRAN tool from slightly modified BDF fonts. Therefore if you have a font in BDF format it is possible to convert it to a form that can be used on Symbian OS devices.

What is the GDR font format?
Symbian OS also supports the GDR font type in tandem with the Open Font System. The GDR font format is a natively supported mechanism for loading different font types within Symbian OS. Symbian's GDR fonts are produced using the FNTTRAN tool from slightly modified BDF fonts. Therefore if you have a font in BDF format it is possible to convert it to a form that can be used on Symbian OS devices.

How can I convert from my unsupported font type to a supported font type?
The only font format that is guaranteed to be supported on a phone is the native GDR format. So you either need to convert your font to GDR, or install the rasterizer for your font type alongside your application.

GDR fonts are produced from BDF files. There are a number of freeware, shareware, and commercial tools that are capable of producing BDF files from TrueType (enter TTF to BDF in any good Internet search engine). DevKit owners may find the example converter ttf2bdf (in \src\...\graphics\fonts\utils\) of use.

Depending on your converter, you may also need to add additional properties to the BDF files. For example, Symbian mandates that each BDF font has its own unique identifier (UID) specified. There is more information on these fields in the Developer Library, see:
» Developer Library » Tools and Utilities » File conversion utilities reference » Bitmap distribution format files

Notes:
  • You should not extract a BDF file from a truetype file unless you have a license for the truetype font that explicitly allows this; most licences do not permit this, and many font licenses explicitly prevent such conversion.
  • Symbian's TTF2BDF is unsupported example code. It has a known bug that the tool crashes when compiling large font sizes.
  • The GDR format has changed between Symbian OS versions to support font compression and other new features. Therefore a GDR font may need to be recompiled for each new version of Symbian OS (for example, Symbian OS v6.1 GDR fonts are not compatible with thos for Symbian OS v7.0s)

Why doesn't my GDR font work?
Different phones may specify different permitted locations for font files. Series 60, for instance, requires that all font files be located on the C:\ drive, to prevent instability if a font file located on a MMC card is removed. Consult the SDK and manufacturer support for information on any such restrictions.

If a GDR file works on some phones but not others, it is possible that the GDR font has been compiled for a different version of Symbian OS (the GDR font format changed between Symbian OS versions in order to support features like bitmap compression). The solution is to recompile the GDR file using the version of FNTTRAN in the appropriate SDK for the target device.