XLFD fonts are no longer supported in Qt 5.
Change-Id: I83400dab417c933d5cd956c0d168c45b9d79dab7
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
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;
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.
/*!
\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
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()
*/
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)
Unknown = 0,
Supported = 1,
UnsupportedFT = 2,
- UnsupportedXLFD = 4,
- Unsupported = UnsupportedFT | UnsupportedXLFD
+ Unsupported = UnsupportedFT
};
QtFontFamily(const QString &n)
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)
{
PitchMismatch = 0x4000,
StyleMismatch = 0x2000,
BitmapScaledPenalty = 0x1000,
- EncodingMismatch = 0x0002,
- XLFDPenalty = 0x0001
+ EncodingMismatch = 0x0002
};
if (pitch != '*') {
#if !defined(QWS) && defined(Q_OS_MAC)
*/
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);
unsigned int score = ~0u;
- Q_UNUSED(forceXLFD);
load(family_name, script);
QFontDatabasePrivate *db = privateDb();
Box,
Multi,
- // X11 types
- XLFD,
-
// MS Windows types
Win,
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]) {
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()
*/