Métodos públicos |
| QFontDatabase () |
QStringList | families () const |
QStringList | families (QFont::Script) const |
QStringList | styles (const QString &) const |
QValueList< int > | pointSizes (const QString &, const QString &=QString::null) |
QValueList< int > | smoothSizes (const QString &, const QString &) |
QString | styleString (const QFont &) |
QFont | font (const QString &, const QString &, int) |
bool | isBitmapScalable (const QString &, const QString &=QString::null) const |
bool | isSmoothlyScalable (const QString &, const QString &=QString::null) const |
bool | isScalable (const QString &, const QString &=QString::null) const |
bool | isFixedPitch (const QString &, const QString &=QString::null) const |
bool | italic (const QString &, const QString &) const |
bool | bold (const QString &, const QString &) const |
int | weight (const QString &, const QString &) const |
QStringList | families (bool) const |
QStringList | styles (const QString &, const QString &) const |
QValueList< int > | pointSizes (const QString &, const QString &, const QString &) |
QValueList< int > | smoothSizes (const QString &, const QString &, const QString &) |
QFont | font (const QString &, const QString &, int, const QString &) |
bool | isBitmapScalable (const QString &, const QString &, const QString &) const |
bool | isSmoothlyScalable (const QString &, const QString &, const QString &) const |
bool | isScalable (const QString &, const QString &, const QString &) const |
bool | isFixedPitch (const QString &, const QString &, const QString &) const |
bool | italic (const QString &, const QString &, const QString &) const |
bool | bold (const QString &, const QString &, const QString &) const |
int | weight (const QString &, const QString &, const QString &) const |
| QFontDatabase () |
QStringList | families () const |
QStringList | families (QFont::Script) const |
QStringList | styles (const QString &) const |
QValueList< int > | pointSizes (const QString &, const QString &=QString::null) |
QValueList< int > | smoothSizes (const QString &, const QString &) |
QString | styleString (const QFont &) |
QFont | font (const QString &, const QString &, int) |
bool | isBitmapScalable (const QString &, const QString &=QString::null) const |
bool | isSmoothlyScalable (const QString &, const QString &=QString::null) const |
bool | isScalable (const QString &, const QString &=QString::null) const |
bool | isFixedPitch (const QString &, const QString &=QString::null) const |
bool | italic (const QString &, const QString &) const |
bool | bold (const QString &, const QString &) const |
int | weight (const QString &, const QString &) const |
QStringList | families (bool) const |
QStringList | styles (const QString &, const QString &) const |
QValueList< int > | pointSizes (const QString &, const QString &, const QString &) |
QValueList< int > | smoothSizes (const QString &, const QString &, const QString &) |
QFont | font (const QString &, const QString &, int, const QString &) |
bool | isBitmapScalable (const QString &, const QString &, const QString &) const |
bool | isSmoothlyScalable (const QString &, const QString &, const QString &) const |
bool | isScalable (const QString &, const QString &, const QString &) const |
bool | isFixedPitch (const QString &, const QString &, const QString &) const |
bool | italic (const QString &, const QString &, const QString &) const |
bool | bold (const QString &, const QString &, const QString &) const |
int | weight (const QString &, const QString &, const QString &) const |
Métodos públicos estáticos |
static QValueList< int > | standardSizes () |
static QString | scriptName (QFont::Script) |
static QString | scriptSample (QFont::Script) |
static QValueList< int > | standardSizes () |
static QString | scriptName (QFont::Script) |
static QString | scriptSample (QFont::Script) |
Amigas |
struct | QFontDef |
class | QFontPrivate |
class | QFontDialog |
class | QFontEngineLatinXLFD |
The QFontDatabase class provides information about the fonts available in the underlying window system.
The most common uses of this class are to query the database for the list of font families() and for the pointSizes() and styles() that are available for each family. An alternative to pointSizes() is smoothSizes() which returns the sizes at which a given family and style will look attractive.
If the font family is available from two or more foundries the foundry name is included in the family name, e.g. "Helvetica
[Adobe]" and "Helvetica [Cronyx]". When you specify a family you can either use the old hyphenated Qt 2.x "foundry-family" format, e.g. "Cronyx-Helvetica", or the new bracketed Qt 3.x "family
[foundry]" format e.g. "Helvetica [Cronyx]". If the family has a foundry it is always returned, e.g. by families(), using the bracketed format.
The font() function returns a QFont given a family, style and point size.
A family and style combination can be checked to see if it is italic() or bold(), and to retrieve its weight(). Similarly we can call isBitmapScalable(), isSmoothlyScalable(), isScalable() and isFixedPitch().
A text version of a style is given by styleString().
The QFontDatabase class also supports some static functions, for example, standardSizes(). You can retrieve the Unicode 3.0 description of a script using scriptName(), and a sample of characters in a script with scriptSample().
Example:
This example gets the list of font families, then the list of styles for each family and the point sizes that are available for each family/style combination.
La documentación para esta clase fue generada a partir de los siguientes ficheros: