Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DirectWrite: Remove ad hoc font resolution through GDI
In b8612eaa2a17e12e31ee28141cff1fb43e54c00e, we added a fail safe where failure to find the font name through DirectWrite would try loading it through GDI instead and if that was successful we would register the family with the database after all. However, the code assumed that CreateFontIndirect() would return NULL if the font did not exist. It does not do this, but instead selecting the HFONT on the HDC will give us a suitable alternative instead. The result would be that any missing font family would be registered with the font database through this mechanism, even if it really didn't exist. This code was added in an early version of the patch, however, and it should not actually be needed anymore, since we in later versions of the same patch also added logic to populate the GDI-compatible family names (DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES etc.). This should take care of backwards compatibility with the GDI names for fonts. Since the code has been reported to cause problems on some systems, it's safest to just remove this hack. Pick-to: 6.8 Task-number: QTBUG-130313 Change-Id: I7eca893d17796d9cac07391b7b947d28dd7cd920 Reviewed-by: Tor Arne Vestbø <[email protected]> (cherry picked from commit 355f54f)
- Loading branch information