diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> | 2016-01-26 14:45:46 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> | 2016-01-26 14:14:34 +0000 |
commit | a67a905190b85b53c30c9cb800b5e282d9364179 (patch) | |
tree | adeb4680d46127f33c27d930f021d457e98005de /src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm | |
parent | ba7f76dea029bc56288ecb46925f5104c6915a71 (diff) |
Fix artihmetic exception when using non-scalable fonts
For non-scalable fonts, the units_per_EM in FreeType is
documented to be undefined and will default to 0, which means
that any division by it will cause an exception.
The emSquareSize() function already checks if the font is scalable
and returns y_ppem if not, so lets use it instead in all locations
where we're not already sure the font is scalable.
[ChangeLog][Text][Freetype] Fixed a divide-by-zero exception
when accessing bitmap fonts.
Change-Id: I8839d4c83047fb3f6bb4d69af0258e94a258a4d9
Task-number: QTBUG-45963
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm')
0 files changed, 0 insertions, 0 deletions