diff options
author | Eskil Abrahamsen Blomfeldt <[email protected]> | 2025-05-30 09:59:31 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <[email protected]> | 2025-06-02 11:34:02 +0200 |
commit | ab7a80a9557e12735f4e3c3fe76ccc72feba2fc8 (patch) | |
tree | 7ee292923b5b34c6c531f1196ffb10bbdf8b9501 /src/gui/kernel/qopenglcontext.cpp | |
parent | b23da37d71bde4673fab3510596514e4ac451053 (diff) |
If a font has an em square size of 0 it is not going to be useful.
However, if one was encountered we returned a default value to
avoid division by zero. The default implementation called ascent(),
which would depend on the em square size again and we would get an
infinite recursion for these fonts.
To avoid this, we simply return a default value of 16 in the case
of a broken font. (The Apple spec gives the range 64 .. 16384 for
the em square and the Microsoft spec says 16 .. 16384, so we use
the smallest of the two.)
Fixes: QTBUG-137277
Pick-to: 6.5 6.8 6.9
Change-Id: I63779e44c10c7021486787d1e1e818f4c6e47835
Reviewed-by: Allan Sandfeld Jensen <[email protected]>
Diffstat (limited to 'src/gui/kernel/qopenglcontext.cpp')
0 files changed, 0 insertions, 0 deletions