Qt 4.8
|
#include <qplatformdefs.h>
#include <qdebug.h>
#include <qpaintdevice.h>
#include <qelapsedtimer.h>
#include <private/qt_x11_p.h>
#include "qx11info_x11.h"
#include <qfile.h>
#include <qtemporaryfile.h>
#include <qabstractfileengine.h>
#include <qmath.h>
#include <ctype.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <private/qfontengine_x11_p.h>
#include <ft2build.h>
#include <FT_FREETYPE_H>
Go to the source code of this file.
Classes | |
struct | XlfdEncoding |
Macros | |
#define | FC_FAMILYLANG "familylang" |
#define | FC_WIDTH "width" |
#define | make_tag(c1, c2, c3, c4) |
Enumerations | |
enum | { SpecialLanguageCount = sizeof(specialLanguages) / sizeof(const char *) } |
enum | { SpecialCharCount = sizeof(specialChars) / sizeof(ushort) } |
enum | { LanguageCount = sizeof(languageForWritingSystem) / sizeof(const char *) } |
enum | { SampleCharCount = sizeof(sampleCharForWritingSystem) / sizeof(ushort) } |
enum | { OpenTypeCount = sizeof(openType) / sizeof(const char *) } |
enum | XLFDFieldNames { Foundry, Family, Weight, Slant, Width, AddStyle, PixelSize, PointSize, ResolutionX, ResolutionY, Spacing, AverageWidth, CharsetRegistry, CharsetEncoding, NFontFields } |
Functions | |
static void | capitalize (char *s) |
static void | checkSymbolFont (QtFontFamily *family) |
static void | checkSymbolFonts (const QString &family=QString()) |
static void | FcFontSetRemove (FcFontSet *fs, int at) |
static FcPattern * | getFcPattern (const QFontPrivate *fp, int script, const QFontDef &request) |
static int | getFCWeight (int fc_weight) |
static QtFontStyle::Key | getStyle (char **tokens) |
static void | initializeDb () |
static bool | isFixedPitch (char **tokens) |
static bool | isScalable (char **tokens) |
static bool | isSmoothlyScalable (char **tokens) |
static bool | isZero (char *x) |
static void | load (const QString &family=QString(), int script=-1, bool forceXLFD=false) |
static QFontEngine * | loadFc (const QFontPrivate *fp, int script, const QFontDef &request) |
static void | loadFontConfig () |
static QFontEngine * | loadRaw (const QFontPrivate *fp, const QFontDef &request) |
static void | loadXlfds (const char *reqFamily, int encoding_id) |
static bool | parseXFontName (char *fontName, char **tokens) |
static bool | preferScalable (const QFontDef &request) |
void | qt_addPatternProps (FcPattern *pattern, int screen, int script, const QFontDef &request) |
int | qt_encoding_id_for_mib (int mib) |
QFontDef | qt_FcPatternToQFontDef (FcPattern *pattern, const QFontDef &request) |
bool | qt_fillFontDef (const QByteArray &xlfd, QFontDef *fd, int dpi, QtFontDesc *desc) |
static bool | qt_fillFontDef (XFontStruct *fs, QFontDef *fd, int dpi, QtFontDesc *desc) |
FcFontSet * | qt_fontSetForPattern (FcPattern *pattern, const QFontDef &request) |
int | qt_mib_for_xlfd_encoding (const char *encoding) |
double | qt_pixelSize (double pointSize, int dpi) |
double | qt_pointSize (double pixelSize, int dpi) |
int | qt_xlfd_encoding_id (const char *encoding) |
static FcPattern * | queryFont (const FcChar8 *file, const QByteArray &data, int id, FcBlanks *blanks, int *count) |
static void | registerFont (QFontDatabasePrivate::ApplicationFont *fnt) |
static const char * | styleHint (const QFontDef &request) |
static QFontEngine * | tryPatternLoad (FcPattern *match, int screen, const QFontDef &request, int script) |
static const char * | xlfd_for_id (int id) |
Variables | |
static unsigned char | encodingLoaded [numEncodings] |
static const char * | languageForWritingSystem [] |
const int | numEncodings = sizeof(xlfd_encoding) / sizeof(XlfdEncoding) - 1 |
static const char * | openType [] |
bool | qt_is_gui_used |
static const ushort | sampleCharForWritingSystem [] |
static const ushort | specialChars [] |
static const char * | specialLanguages [] |
static const char | writingSystems_for_xlfd_encoding [sizeof(xlfd_encoding)][QFontDatabase::WritingSystemsCount] |
static const XlfdEncoding | xlfd_encoding [] |
static bool | xlfdsFullyLoaded = false |
#define FC_FAMILYLANG "familylang" |
Definition at line 2006 of file qfontdatabase_x11.cpp.
Referenced by registerFont().
#define FC_WIDTH "width" |
Definition at line 726 of file qfontdatabase_x11.cpp.
Referenced by loadFontConfig(), QFontconfigDatabase::populateFontDatabase(), qt_addPatternProps(), and qt_FcPatternToQFontDef().
#define make_tag | ( | c1, | |
c2, | |||
c3, | |||
c4 | |||
) |
Definition at line 103 of file qfontdatabase_x11.cpp.
Referenced by qt_xlfd_encoding_id().
anonymous enum |
Enumerator | |
---|---|
SpecialLanguageCount |
Definition at line 845 of file qfontdatabase_x11.cpp.
anonymous enum |
Enumerator | |
---|---|
SpecialCharCount |
Definition at line 877 of file qfontdatabase_x11.cpp.
anonymous enum |
Enumerator | |
---|---|
LanguageCount |
Definition at line 917 of file qfontdatabase_x11.cpp.
anonymous enum |
Enumerator | |
---|---|
SampleCharCount |
Definition at line 957 of file qfontdatabase_x11.cpp.
anonymous enum |
Enumerator | |
---|---|
OpenTypeCount |
Definition at line 998 of file qfontdatabase_x11.cpp.
enum XLFDFieldNames |
Enumerator | |
---|---|
Foundry | |
Family | |
Weight | |
Slant | |
Width | |
AddStyle | |
PixelSize | |
PointSize | |
ResolutionX | |
ResolutionY | |
Spacing | |
AverageWidth | |
CharsetRegistry | |
CharsetEncoding | |
NFontFields |
Definition at line 420 of file qfontdatabase_x11.cpp.
|
inlinestatic |
Definition at line 84 of file qfontdatabase_x11.cpp.
Referenced by loadXlfds(), and qt_fillFontDef().
|
static |
Definition at line 1268 of file qfontdatabase_x11.cpp.
Referenced by checkSymbolFonts().
Definition at line 1297 of file qfontdatabase_x11.cpp.
Referenced by QFontDatabase::families(), and QFontDatabase::writingSystems().
|
static |
|
static |
Definition at line 1524 of file qfontdatabase_x11.cpp.
Referenced by loadFc().
|
static |
Definition at line 729 of file qfontdatabase_x11.cpp.
Referenced by loadFontConfig(), and qt_FcPatternToQFontDef().
|
static |
Definition at line 569 of file qfontdatabase_x11.cpp.
Referenced by loadXlfds(), and QFormLayoutPrivate::~QFormLayoutPrivate().
|
static |
Definition at line 1313 of file qfontdatabase_x11.cpp.
Referenced by load(), loadFontConfig(), and QFontDatabase::loadXlfd().
|
inlinestatic |
Definition at line 489 of file qfontdatabase_x11.cpp.
Referenced by loadXlfds().
|
inlinestatic |
Definition at line 476 of file qfontdatabase_x11.cpp.
Referenced by loadXlfds().
|
inlinestatic |
Definition at line 483 of file qfontdatabase_x11.cpp.
Referenced by QFontDatabase::isScalable(), and loadXlfds().
|
inlinestatic |
Definition at line 471 of file qfontdatabase_x11.cpp.
Referenced by isScalable(), and isSmoothlyScalable().
|
static |
Definition at line 1228 of file qfontdatabase_x11.cpp.
|
static |
Definition at line 1702 of file qfontdatabase_x11.cpp.
Referenced by QFontDatabase::loadXlfd().
|
static |
Definition at line 1001 of file qfontdatabase_x11.cpp.
Referenced by initializeDb().
|
static |
Definition at line 1777 of file qfontdatabase_x11.cpp.
Referenced by QFontDatabase::loadXlfd().
|
static |
Definition at line 609 of file qfontdatabase_x11.cpp.
Referenced by initializeDb(), and load().
|
static |
Definition at line 439 of file qfontdatabase_x11.cpp.
Referenced by loadXlfds(), and qt_fillFontDef().
|
static |
Definition at line 1518 of file qfontdatabase_x11.cpp.
Referenced by getFcPattern().
void qt_addPatternProps | ( | FcPattern * | pattern, |
int | screen, | ||
int | script, | ||
const QFontDef & | request | ||
) |
Definition at line 1458 of file qfontdatabase_x11.cpp.
Referenced by getFcPattern().
int qt_encoding_id_for_mib | ( | int | mib | ) |
Definition at line 401 of file qfontdatabase_x11.cpp.
Referenced by qt_x11_set_fallback_font_family().
Definition at line 744 of file qfontdatabase_x11.cpp.
Referenced by QFontEngineMultiFT::loadEngine(), and tryPatternLoad().
bool qt_fillFontDef | ( | const QByteArray & | xlfd, |
QFontDef * | fd, | ||
int | dpi, | ||
QtFontDesc * | desc | ||
) |
Definition at line 503 of file qfontdatabase_x11.cpp.
Referenced by loadRaw(), QFontDatabase::loadXlfd(), qt_fillFontDef(), and qt_x11_set_fallback_font_family().
|
static |
Definition at line 555 of file qfontdatabase_x11.cpp.
FcFontSet* qt_fontSetForPattern | ( | FcPattern * | pattern, |
const QFontDef & | request | ||
) |
Definition at line 1668 of file qfontdatabase_x11.cpp.
Referenced by QFontEngineMultiFT::loadEngine(), and loadFc().
int qt_mib_for_xlfd_encoding | ( | const char * | encoding | ) |
Definition at line 394 of file qfontdatabase_x11.cpp.
Referenced by fontFile().
double qt_pixelSize | ( | double | pointSize, |
int | dpi | ||
) |
Definition at line 74 of file qfont_x11.cpp.
Referenced by QFontDatabase::loadXlfd(), and qt_fillFontDef().
double qt_pointSize | ( | double | pixelSize, |
int | dpi | ||
) |
Definition at line 83 of file qfont_x11.cpp.
Referenced by QFontDatabase::loadXlfd(), qt_FcPatternToQFontDef(), and qt_fillFontDef().
int qt_xlfd_encoding_id | ( | const char * | encoding | ) |
Definition at line 350 of file qfontdatabase_x11.cpp.
Referenced by fontFile(), loadXlfds(), and qt_mib_for_xlfd_encoding().
|
static |
Definition at line 1749 of file qfontdatabase_x11.cpp.
Referenced by registerFont().
|
static |
Definition at line 2009 of file qfontdatabase_x11.cpp.
Referenced by checkSymbolFonts(), and initializeDb().
|
static |
Definition at line 1435 of file qfontdatabase_x11.cpp.
Referenced by getFcPattern(), and QFontDatabase::loadXlfd().
|
static |
Definition at line 1613 of file qfontdatabase_x11.cpp.
Referenced by loadFc().
|
static |
Definition at line 411 of file qfontdatabase_x11.cpp.
Referenced by initializeDb(), QFontDatabase::loadXlfd(), and loadXlfds().
|
static |
Definition at line 607 of file qfontdatabase_x11.cpp.
|
static |
Definition at line 881 of file qfontdatabase_x11.cpp.
Referenced by initializeDb(), and initWritingSystems().
const int numEncodings = sizeof(xlfd_encoding) / sizeof(XlfdEncoding) - 1 |
Definition at line 348 of file qfontdatabase_x11.cpp.
Referenced by load(), and xlfd_for_id().
|
static |
Definition at line 962 of file qfontdatabase_x11.cpp.
bool qt_is_gui_used |
Definition at line 492 of file qapplication.cpp.
Referenced by QApplicationPrivate::appName(), QApplicationPrivate::construct(), QFontDatabase::loadXlfd(), QApplicationPrivate::process_cmdline(), qt_cleanup(), qt_init(), qt_init_display(), QApplicationPrivate::qt_mac_apply_settings(), QApplication::style(), and QApplication::~QApplication().
|
static |
Definition at line 921 of file qfontdatabase_x11.cpp.
|
static |
Definition at line 847 of file qfontdatabase_x11.cpp.
|
static |
Definition at line 815 of file qfontdatabase_x11.cpp.
|
static |
Definition at line 156 of file qfontdatabase_x11.cpp.
Referenced by findEncoding(), load(), and loadXlfds().
|
static |
Definition at line 115 of file qfontdatabase_x11.cpp.
Referenced by QFontDatabase::loadXlfd(), qt_encoding_id_for_mib(), and qt_xlfd_encoding_id().
|
static |
Definition at line 606 of file qfontdatabase_x11.cpp.