Fix some cases of scaled text disappearing with freetype
Commit a56ee60791
changed type of advance
to short, restoring this fixes at least some cases where glyphs were
disappearing.
Task-number: QTBUG-65838
Change-Id: I33b252d91fb7541eaea3275b1950a048941869a6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
parent
1f0c228448
commit
b7e4367387
@ -994,9 +994,7 @@ int QFontEngineFT::loadFlags(QGlyphSet *set, GlyphFormat format, int flags,
|
|||||||
static inline bool areMetricsTooLarge(const QFontEngineFT::GlyphInfo &info)
|
static inline bool areMetricsTooLarge(const QFontEngineFT::GlyphInfo &info)
|
||||||
{
|
{
|
||||||
// false if exceeds QFontEngineFT::Glyph metrics
|
// false if exceeds QFontEngineFT::Glyph metrics
|
||||||
return (short)(info.linearAdvance) != info.linearAdvance
|
return info.width > 0xFF || info.height > 0xFF;
|
||||||
|| (uchar)(info.width) != info.width
|
|
||||||
|| (uchar)(info.height) != info.height;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void transformBoundingBox(int *left, int *top, int *right, int *bottom, FT_Matrix *matrix)
|
static inline void transformBoundingBox(int *left, int *top, int *right, int *bottom, FT_Matrix *matrix)
|
||||||
|
@ -133,7 +133,7 @@ public:
|
|||||||
/* we don't cache glyphs that are too large anyway, so we can make this struct rather small */
|
/* we don't cache glyphs that are too large anyway, so we can make this struct rather small */
|
||||||
struct Glyph {
|
struct Glyph {
|
||||||
~Glyph();
|
~Glyph();
|
||||||
short linearAdvance;
|
int linearAdvance : 22;
|
||||||
unsigned char width;
|
unsigned char width;
|
||||||
unsigned char height;
|
unsigned char height;
|
||||||
short x;
|
short x;
|
||||||
|
Loading…
Reference in New Issue
Block a user