Qtopia Core Fonts
|
Optimization The FreeType, QPF2 and QPF formats are features that can be disabled using Qtopia Core's feature definition system, reducing the size of Qt and saving resources. Note that at least one font format must be defined. See the Fine-Tuning Features in Qtopia Core 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.
The FreeType 2 library (and therefore Qtopia Core) can support the following font formats:
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.
The Qt Prerendered Font (QPF2) is an architecture-independent, light-weight and non-scalable font format specific to Qtopia Core.
Trolltech provides the cross-platform makeqpf tool, included in the tools directory of both Qt and Qtopia Core, which allows generation of QPF2 files from system fonts.
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.
Trolltech provides support for the legacy QPF format for compatibility reasons. QPF is based on the internal font engine data structure of Qt/Embedded (Qtopia Core's predecessor) 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 Qtopia Core 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
Field | Description |
---|---|
name | The name of the font format, e.g.,Helvetica, Times, etc. |
file | The name of the file containing the font, e.g., helvR0810.bdf, verdana.ttf, etc. |
renderer | Specifies the font engine that should be used to render the font, currently only the FreeType font engine (FT) is supported. |
italic | Specifies whether the font is italic or not; the accepted values are y or n. |
weight | Specifies the font's weight: 50 is normal, 75 is bold, etc. |
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. |
Copyright © 2008 Trolltech | Trademarks | Qt 4.3.5 |
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |