Support glyphs larger than 255x255 with Freetype engine
We used chars for the width and height of glyphs when caching them in the Freetype engine. This was okay for Qt Widgets because we would fall back to QPainterPath when the fonts were too big anyway (though this has since become configurable). But in Qt Quick, when NativeRendering is in use, we will always cache glyphs, because they need to be uploaded to the GPU. Also 255 is no longer a large font size with current screen sizes, so we need to upgrade our maximum. The new maximum size is 65535x65535. [ChangeLog][QtGui][Text] Fixed a bug where glyphs would be clipped at very large sizes. Fixes: QTBUG-85259 Pick-to: 5.15 Change-Id: I9a01a707b274e5f12e49c1b0bd58f743abae9f5e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
parent
9b36f48f59
commit
037dce81fc
@ -123,13 +123,13 @@ public:
|
||||
};
|
||||
Q_DECLARE_FLAGS(ShaperFlags, ShaperFlag)
|
||||
|
||||
/* Used with the Freetype font engine. We don't cache glyphs that are too large anyway, so we can make this struct rather small */
|
||||
/* Used with the Freetype font engine. */
|
||||
struct Glyph {
|
||||
Glyph() = default;
|
||||
~Glyph() { delete [] data; }
|
||||
short linearAdvance = 0;
|
||||
unsigned char width = 0;
|
||||
unsigned char height = 0;
|
||||
unsigned short width = 0;
|
||||
unsigned short height = 0;
|
||||
short x = 0;
|
||||
short y = 0;
|
||||
short advance = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user