Qt for Embedded Linux Fonts
Qt for Embedded Linux uses the FreeType 2 font engine to produce font output. The formats supported depends on the locally installed version of the FreeType library. In addition, Qt for Embedded Linux supports the Qt Prerendered Font formats (QPF and QPF2): light-weight non-scalable font formats specific to Qt for Embedded Linux. QPF2 is the native format of Qt for Embedded Linux. QPF is the legacy format used by Qt/Embedded 2.x and 3.x. Several of the formats may be rendered using anti-aliasing for improved readability.
When Qt for Embedded Linux applications run, they look for fonts in Qt's
lib/fonts/ directory. Qt for Embedded Linux will automatically detect prerendered fonts and TrueType fonts. For compatibility, it will also read the legacy
Support for other font formats can be added. To make a suggestion, please create a task in our bug tracker.
Note that at least one font format must be defined.
See the Fine-Tuning Features in Qt documentation for details.
All supported fonts use the Unicode character encoding. Most fonts available today do, but they usually don't contain all the Unicode characters. A complete 16-point Unicode font uses over 1 MB of memory.
- TrueType (TTF)
- PostScript Type1 (PFA/PFB)
- Bitmap Distribution Format (BDF)
- CID-keyed Type1
- Compact Font Format (CFF)
- OpenType fonts
- SFNT-based bitmap fonts
- Portable Compiled Format (PCF)
- Microsoft Windows Font File Format (Windows FNT)
- Portable Font Resource (PFR)
- Type 42 (limited support)
It is possible to add modules to the FreeType 2 font engine to support other types of font files. For more information, see the font engine's own website: http://freetype.sourceforge.net/freetype2/index.html.
Glyphs rendered using FreeType are shared efficiently between applications, reducing memory requirements and speeding up text rendering.
Qt Prerendered Font (QPF2)
The Qt Prerendered Font (QPF2) is an architecture-independent, light-weight and non-scalable font format specific to Qt for Embedded Linux.
QPF2 supports anti-aliasing and complex writing systems, using information from the corresponding TrueType font, if present on the system. The format is designed to be mapped directly to memory. The same format is used to share glyphs from non-prerendered fonts between applications.
Legacy Qt Prerendered Font (QPF)
Nokia provides support for the legacy QPF format for compatibility reasons. QPF is based on the internal font engine data structure of Qt/Embedded versions 2 and 3.
Note that the file name describes the font, for example
helvetica_120_50.qpf is 12 point Helvetica while
helvetica_120_50i.qpf is 12 point Helvetica italic.
For compatibility reasons Qt for Embedded Linux supports the
fontdir file, if present. The file defines additional fonts available to the application, and has the following format:
name file renderer italic weight size flags
|name||The name of the font format, e.g.,|
|file||The name of the file containing the font, e.g., |
|renderer||Specifies the font engine that should be used to render the font, currently only the FreeType font engine (|
|italic||Specifies whether the font is italic or not; the accepted values are |
|weight||Specifies the font's weight: |
|size||Specifies the font size, i.e., point size * 10. For example, a value of 120 means 12pt. A value of 0 means that the font is scalable.|
|flags||The following flag is supported:|
All other flags are ignored.
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.