Codechange: [Win32] Pass a native GDI font description around when we have one, instead of repeatedly guessing the font.
This commit is contained in:
@@ -148,6 +148,8 @@ void UniscribeResetScriptCache(FontSize size)
|
||||
/** Load the matching native Windows font. */
|
||||
static HFONT HFontFromFont(Font *font)
|
||||
{
|
||||
if (font->fc->GetOSHandle() != nullptr) return CreateFontIndirect((PLOGFONT)font->fc->GetOSHandle());
|
||||
|
||||
LOGFONT logfont;
|
||||
ZeroMemory(&logfont, sizeof(LOGFONT));
|
||||
logfont.lfHeight = font->fc->GetHeight();
|
||||
|
Reference in New Issue
Block a user