diff options
| author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2020-08-27 11:54:05 +0200 |
|---|---|---|
| committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2020-08-30 01:57:37 +0200 |
| commit | cba147d35915c50c2ee46041e635bdc297053e08 (patch) | |
| tree | 52300552350ec2af973b0ccd25457fe7714e95a3 /src/gui/doc/snippets/plaintextlayout/main.cpp | |
| parent | 707b64bece4b5639a6bf5f2f51bd00690b77bead (diff) | |
Fix text issues when using typographic names
By default, only the legacy family names are populated on Windows,
since we are using GDI to do the population.
The actual typographic names are added later as aliases when
the font is loaded.
This can cause us to fail matching a font against its typographic
name before it has been loaded and e.g .in Qt Quick we will cache
the glyph indexes for a fallback font instead. If the font is later
loaded and aliases are populated, we will use the cached glyph
indexes and get seemingly random glyphs displayed.
We reuse the mechanism invented for CoreText to do lazy population
of aliases. The population will now happen when the first non-match
occurs, and a second attempt will be made after we populate aliases.
[ChangeLog][Windows] Fixes an issue where fonts would sometimes not
fail to work when selected using typographic names.
Fixes: QTBUG-84786
Pick-to: 5.15
Change-Id: Ic7b65cde26ddcbf1a257f1673b9af37154660c2f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/gui/doc/snippets/plaintextlayout/main.cpp')
0 files changed, 0 insertions, 0 deletions
