diff options
-rw-r--r-- | src/gui/painting/qpainter.h | 5 | ||||
-rw-r--r-- | src/gui/text/qfont.cpp | 18 | ||||
-rw-r--r-- | src/gui/text/qfontdatabase.cpp | 11 | ||||
-rw-r--r-- | src/gui/text/qfontengine_p.h | 3 | ||||
-rw-r--r-- | src/gui/text/qtextengine.cpp | 10 | ||||
-rw-r--r-- | src/gui/text/qtextformat.cpp | 1 |
6 files changed, 10 insertions, 38 deletions
diff --git a/src/gui/painting/qpainter.h b/src/gui/painting/qpainter.h index 5ea38682b8..2c8e19ef4a 100644 --- a/src/gui/painting/qpainter.h +++ b/src/gui/painting/qpainter.h @@ -474,14 +474,9 @@ private: friend class QFontEngineFT; friend class QFontEngineMac; friend class QFontEngineWin; - friend class QFontEngineXLFD; - friend class QWSManager; friend class QPaintEngine; friend class QPaintEngineExPrivate; friend class QOpenGLPaintEngine; - friend class QVGPaintEngine; - friend class QX11PaintEngine; - friend class QX11PaintEnginePrivate; friend class QWin32PaintEngine; friend class QWin32PaintEnginePrivate; friend class QRasterPaintEngine; diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index 71c060ebdb..7b2288cbc6 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -549,9 +549,7 @@ QFontEngineData::~QFontEngineData() Returns the name of the font within the underlying window system. - On X11, this function will return an empty string if Qt is built with - FontConfig support; otherwise the XLFD (X Logical Font Description) is - returned. + On X11, this function will return an empty string. Using the return value of this function is usually \e not \e portable. @@ -562,11 +560,7 @@ QFontEngineData::~QFontEngineData() /*! \fn void QFont::setRawName(const QString &name) - Sets a font by its system specific name. The function is - particularly useful under X, where system font settings (for - example X resources) are usually available in XLFD (X Logical Font - Description) form only. You can pass an XLFD as \a name to this - function. + Sets a font by its system specific name. A font set with setRawName() is still a full-featured QFont. It can be queried (for example with italic()) or modified (for example with @@ -575,10 +569,6 @@ QFontEngineData::~QFontEngineData() If Qt's internal font database cannot resolve the raw name, the font becomes a raw font with \a name as its family. - Note that the present implementation does not handle wildcards in - XLFDs well, and that font aliases (file \c fonts.alias in the font - directory on X11) are not supported. - \sa rawName(), setRawMode(), setFamily() */ @@ -1425,10 +1415,6 @@ int QFont::stretch() const The stretch factor is only applied to outline fonts. The stretch factor is ignored for bitmap fonts. - NOTE: QFont cannot stretch XLFD fonts. When loading XLFD fonts on - X11, the stretch factor is matched against a predefined set of - values for the SETWIDTH_NAME field of the XLFD. - \sa stretch(), QFont::Stretch */ void QFont::setStretch(int factor) diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index b8e1e0cc3b..4b8a18d491 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -322,8 +322,7 @@ struct QtFontFamily Unknown = 0, Supported = 1, UnsupportedFT = 2, - UnsupportedXLFD = 4, - Unsupported = UnsupportedFT | UnsupportedXLFD + Unsupported = UnsupportedFT }; QtFontFamily(const QString &n) @@ -724,7 +723,7 @@ struct QtFontDesc static void match(int script, const QFontDef &request, const QString &family_name, const QString &foundry_name, int force_encoding_id, - QtFontDesc *desc, const QList<int> &blacklistedFamilies = QList<int>(), bool forceXLFD=false); + QtFontDesc *desc, const QList<int> &blacklistedFamilies = QList<int>()); static void initFontDef(const QtFontDesc &desc, const QFontDef &request, QFontDef *fontDef, bool multi) { @@ -965,8 +964,7 @@ unsigned int bestFoundry(int script, unsigned int score, int styleStrategy, PitchMismatch = 0x4000, StyleMismatch = 0x2000, BitmapScaledPenalty = 0x1000, - EncodingMismatch = 0x0002, - XLFDPenalty = 0x0001 + EncodingMismatch = 0x0002 }; if (pitch != '*') { #if !defined(QWS) && defined(Q_OS_MAC) @@ -1025,7 +1023,7 @@ static bool matchFamilyName(const QString &familyName, QtFontFamily *f) */ static void match(int script, const QFontDef &request, const QString &family_name, const QString &foundry_name, int force_encoding_id, - QtFontDesc *desc, const QList<int> &blacklistedFamilies, bool forceXLFD) + QtFontDesc *desc, const QList<int> &blacklistedFamilies) { Q_UNUSED(force_encoding_id); @@ -1056,7 +1054,6 @@ static void match(int script, const QFontDef &request, unsigned int score = ~0u; - Q_UNUSED(forceXLFD); load(family_name, script); QFontDatabasePrivate *db = privateDb(); diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h index bcf763d5d9..0d635c4323 100644 --- a/src/gui/text/qfontengine_p.h +++ b/src/gui/text/qfontengine_p.h @@ -91,9 +91,6 @@ public: Box, Multi, - // X11 types - XLFD, - // MS Windows types Win, diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 18cc34ceef..11dded8ef3 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -2417,12 +2417,10 @@ QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int if (feForEllipsis->type() == QFontEngine::Mac) feForEllipsis = fe; - // the lookup can be really slow when we use XLFD fonts - if (feForEllipsis->type() != QFontEngine::XLFD - && feForEllipsis->canRender(&ellipsisChar, 1)) { - int nGlyphs = 1; - feForEllipsis->stringToCMap(&ellipsisChar, 1, &ellipsisGlyph, &nGlyphs, 0); - } + if (feForEllipsis->canRender(&ellipsisChar, 1)) { + int nGlyphs = 1; + feForEllipsis->stringToCMap(&ellipsisChar, 1, &ellipsisGlyph, &nGlyphs, 0); + } } if (ellipsisGlyph.glyphs[0]) { diff --git a/src/gui/text/qtextformat.cpp b/src/gui/text/qtextformat.cpp index 9995110c1d..a7f9de04d8 100644 --- a/src/gui/text/qtextformat.cpp +++ b/src/gui/text/qtextformat.cpp @@ -3129,7 +3129,6 @@ QTextImageFormat::QTextImageFormat(const QTextFormat &fmt) The stretch factor is only applied to outline fonts. The stretch factor is ignored for bitmap fonts. - NOTE: QFont cannot stretch XLFD fonts. When loading XLFD fonts on X11, the stretch factor is matched against a predefined set of values for the SETWIDTH_NAME field of the XLFD. \sa fontStretch() */ |