mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-11 04:27:42 +00:00
Better fontcache crash fix
This commit is contained in:
@@ -37,11 +37,17 @@ void ViewResources::init(boo::IGraphicsDataFactory* factory, FontCache* fcache,
|
||||
void ViewResources::prepFontCacheSync()
|
||||
{
|
||||
unsigned dpi = 72.f * m_pixelFactor;
|
||||
if (m_fcacheInterrupt) return;
|
||||
m_mainFont = m_fcache->prepMainFont(m_factory, AllCharFilter, false, 10.f, dpi);
|
||||
if (m_fcacheInterrupt) return;
|
||||
m_monoFont = m_fcache->prepMonoFont(m_factory, AllCharFilter, false, 10.f, dpi);
|
||||
if (m_fcacheInterrupt) return;
|
||||
m_heading14 = m_fcache->prepMainFont(m_factory, LatinAndJapaneseCharFilter, false, 14.f, dpi);
|
||||
if (m_fcacheInterrupt) return;
|
||||
m_heading18 = m_fcache->prepMainFont(m_factory, LatinAndJapaneseCharFilter, false, 18.f, dpi);
|
||||
if (m_fcacheInterrupt) return;
|
||||
m_titleFont = m_fcache->prepMainFont(m_factory, LatinCharFilter, false, 36.f, dpi);
|
||||
if (m_fcacheInterrupt) return;
|
||||
m_fcache->closeBuiltinFonts();
|
||||
m_fcacheReady = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user