mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-25 11:22:58 +00:00
replace QFontEngineFT::loadGlyph() overload with its body
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
4217985e75
commit
4d930a67b1
2 changed files with 6 additions and 8 deletions
|
@ -576,7 +576,7 @@ int QFontEngineFT::loadFlags(QGlyphSet *set, GlyphFormat format, int flags,
|
||||||
return load_flags;
|
return load_flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
|
QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(glyph_t glyph,
|
||||||
GlyphFormat format,
|
GlyphFormat format,
|
||||||
bool fetchMetricsOnly) const
|
bool fetchMetricsOnly) const
|
||||||
{
|
{
|
||||||
|
@ -590,7 +590,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Glyph *g = set->getGlyph(glyph);
|
Glyph *g = defaultGlyphSet.getGlyph(glyph);
|
||||||
if (g && g->format == format) {
|
if (g && g->format == format) {
|
||||||
return g;
|
return g;
|
||||||
}
|
}
|
||||||
|
@ -600,7 +600,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
|
||||||
Q_ASSERT(format != Format_None);
|
Q_ASSERT(format != Format_None);
|
||||||
bool hsubpixel = false;
|
bool hsubpixel = false;
|
||||||
int vfactor = 1;
|
int vfactor = 1;
|
||||||
int load_flags = loadFlags(set, format, 0, hsubpixel, vfactor);
|
int load_flags = loadFlags(&defaultGlyphSet, format, 0, hsubpixel, vfactor);
|
||||||
|
|
||||||
if (format != Format_Mono && !embeddedbitmap)
|
if (format != Format_Mono && !embeddedbitmap)
|
||||||
load_flags |= FT_LOAD_NO_BITMAP;
|
load_flags |= FT_LOAD_NO_BITMAP;
|
||||||
|
@ -634,7 +634,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
|
||||||
if (err != FT_Err_Ok)
|
if (err != FT_Err_Ok)
|
||||||
qWarning("load glyph failed err=%x face=%p, glyph=%d", err, face, glyph);
|
qWarning("load glyph failed err=%x face=%p, glyph=%d", err, face, glyph);
|
||||||
|
|
||||||
if (set->outline_drawing && fetchMetricsOnly)
|
if (defaultGlyphSet.outline_drawing && fetchMetricsOnly)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
FT_GlyphSlot slot = face->glyph;
|
FT_GlyphSlot slot = face->glyph;
|
||||||
|
@ -859,7 +859,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
|
||||||
delete [] g->data;
|
delete [] g->data;
|
||||||
g->data = glyph_buffer;
|
g->data = glyph_buffer;
|
||||||
|
|
||||||
set->setGlyph(glyph, g);
|
defaultGlyphSet.setGlyph(glyph, g);
|
||||||
|
|
||||||
return g;
|
return g;
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,9 +198,7 @@ private:
|
||||||
|
|
||||||
inline bool invalid() const { return xsize == 0 && ysize == 0; }
|
inline bool invalid() const { return xsize == 0 && ysize == 0; }
|
||||||
|
|
||||||
inline Glyph *loadGlyph(uint glyph, GlyphFormat format = Format_None, bool fetchMetricsOnly = false) const
|
Glyph *loadGlyph(glyph_t glyph, GlyphFormat format = Format_None, bool fetchMetricsOnly = false) const;
|
||||||
{ return loadGlyph(&defaultGlyphSet, glyph, format, fetchMetricsOnly); }
|
|
||||||
Glyph *loadGlyph(QGlyphSet *set, uint glyph, GlyphFormat = Format_None, bool fetchMetricsOnly = false) const;
|
|
||||||
|
|
||||||
QFontEngineFT(const QFontDef &fd);
|
QFontEngineFT(const QFontDef &fd);
|
||||||
virtual ~QFontEngineFT();
|
virtual ~QFontEngineFT();
|
||||||
|
|
Loading…
Add table
Reference in a new issue