Re-enable runtime font rendering if a font handler is assigned, clean up some font handler things.

This commit is contained in:
elasota
2021-04-15 19:32:15 -04:00
parent c49bab04d5
commit 4e8e76f8fc
15 changed files with 103 additions and 140 deletions

View File

@@ -106,6 +106,16 @@ namespace PortabilityLayer
return font;
}
void FontFamily::UnloadVariation(int variation)
{
FontSpec &spec = m_fontSpecs[variation];
if (spec.m_font)
{
spec.m_font->Destroy();
spec.m_font = nullptr;
}
}
PortabilityLayer::FontHacks FontFamily::GetHacksForVariation(int variation) const
{
return m_fontSpecs[variation].m_hacks;