QGIS API Documentation
2.2.0-Valmiera
|
#include <qgsfontutils.h>
Static Public Member Functions | |
static bool | fontMatchOnSystem (const QFont &f) |
Check whether exact font is on system. | |
static bool | fontFamilyOnSystem (const QString &family) |
Check whether font family is on system in a quick manner, which does not compare [foundry]. | |
static bool | fontFamilyHasStyle (const QString &family, const QString &style) |
Check whether font family on system has specific style. | |
static bool | fontFamilyMatchOnSystem (const QString &family, QString *chosen=0, bool *match=0) |
Check whether font family is on system. | |
static bool | updateFontViaStyle (QFont &f, const QString &fontstyle, bool fallback=false) |
Updates font with named style and retain all font properties. | |
static QString | standardTestFontFamily () |
Get standard test font family. | |
static bool | loadStandardTestFonts (QStringList loadstyles) |
Loads standard test fonts from filesystem or qrc resource. | |
static QFont | getStandardTestFont (const QString &style="Roman", int pointsize=12) |
Get standard test font with specific style. |
Definition at line 22 of file qgsfontutils.h.
|
static |
Check whether font family on system has specific style.
family | The family to test |
style | The style to test for |
Definition at line 42 of file qgsfontutils.cpp.
References fontFamilyOnSystem().
Referenced by getStandardTestFont(), loadStandardTestFonts(), and updateFontViaStyle().
|
static |
Check whether font family is on system.
family | The family to test |
chosen | The actual family (possibly from different foundry) returned by system |
match | Whether the family [foundry] returned by system is a match |
Definition at line 48 of file qgsfontutils.cpp.
Referenced by QgsPalLayerSettings::readFromLayer().
|
static |
Check whether font family is on system in a quick manner, which does not compare [foundry].
family | The family to test |
Definition at line 35 of file qgsfontutils.cpp.
Referenced by fontFamilyHasStyle(), and QgsPalLayerSettings::parseTextStyle().
|
static |
Check whether exact font is on system.
f | The font to test for match |
Definition at line 29 of file qgsfontutils.cpp.
|
static |
Get standard test font with specific style.
style | Style to load, e.g. Roman, Oblique, Bold, Bold Oblique |
pointsize | Font point size to set |
Definition at line 265 of file qgsfontutils.cpp.
References fontFamilyHasStyle(), loadStandardTestFonts(), and standardTestFontFamily().
|
static |
Loads standard test fonts from filesystem or qrc resource.
loadstyles | List of styles to load, e.g. All, Roman, Oblique, Bold, Bold Oblique |
Definition at line 203 of file qgsfontutils.cpp.
References QgsApplication::buildSourcePath(), fontFamilyHasStyle(), QgsApplication::isRunningFromBuildDir(), QgsDebugMsg, and standardTestFontFamily().
Referenced by getStandardTestFont().
|
static |
Get standard test font family.
Definition at line 198 of file qgsfontutils.cpp.
Referenced by getStandardTestFont(), and loadStandardTestFonts().
|
static |
Updates font with named style and retain all font properties.
f | The font to update |
fontstyle | The style to try and switch the font to |
fallback | If no matching fontstyle found for font, assign most similar or first style found to font |
Definition at line 101 of file qgsfontutils.cpp.
References fontFamilyHasStyle().
Referenced by QgsPalLayerSettings::parseTextStyle(), and QgsPalLayerSettings::readFromLayer().