Codechange: [Win32] Pass a native GDI font description around when we have one, instead of repeatedly guessing the font.

This commit is contained in:
Michael Lutz
2018-11-25 02:02:20 +01:00
committed by Owen Rudge
parent 2675762ae9
commit d2ed426077
8 changed files with 46 additions and 13 deletions

View File

@@ -125,6 +125,15 @@ public:
*/
virtual const void *GetFontTable(uint32 tag, size_t &length) = 0;
/**
* Get the native OS font handle, if there is one.
* @return Opaque OS font handle.
*/
virtual void *GetOSHandle()
{
return nullptr;
}
/**
* Get the name of this font.
* @return The name of the font.
@@ -209,6 +218,8 @@ struct FreeTypeSubSetting {
char font[MAX_PATH]; ///< The name of the font, or path to the font.
uint size; ///< The (requested) size of the font.
bool aa; ///< Whether to do anti aliasing or not.
const void *os_handle = nullptr; ///< Optional native OS font info.
};
/** Settings for the freetype fonts. */