summaryrefslogtreecommitdiffstats
path: root/src/widgets/accessible/complexwidgets.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <[email protected]>2025-05-30 09:59:31 +0200
committerEskil Abrahamsen Blomfeldt <[email protected]>2025-06-02 11:34:02 +0200
commitab7a80a9557e12735f4e3c3fe76ccc72feba2fc8 (patch)
tree7ee292923b5b34c6c531f1196ffb10bbdf8b9501 /src/widgets/accessible/complexwidgets.cpp
parentb23da37d71bde4673fab3510596514e4ac451053 (diff)
DirectWrite: Avoid infinite recursion with broken font dataHEADdev
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/widgets/accessible/complexwidgets.cpp')
0 files changed, 0 insertions, 0 deletions