mirror of https://github.com/AxioDL/metaforce.git
Pixel factor switching fix
This commit is contained in:
parent
cb8d7145c2
commit
f4c0903eee
|
@ -59,6 +59,7 @@ class FontAtlas
|
|||
friend class FontCache;
|
||||
FT_Face m_face;
|
||||
boo::ITextureSA* m_tex = nullptr;
|
||||
boo::IGraphicsDataToken m_token;
|
||||
uint32_t m_dpi;
|
||||
FT_Fixed m_ftXscale;
|
||||
FT_UShort m_ftXPpem;
|
||||
|
|
|
@ -57,7 +57,6 @@ public:
|
|||
SplitView::Resources m_splitRes;
|
||||
Toolbar::Resources m_toolbarRes;
|
||||
Button::Resources m_buttonRes;
|
||||
boo::IGraphicsDataToken m_fontData;
|
||||
boo::IGraphicsDataToken m_resData;
|
||||
|
||||
Specter::FontTag m_mainFont;
|
||||
|
|
|
@ -377,6 +377,7 @@ FontAtlas::FontAtlas(boo::IGraphicsDataFactory* gf, FT_Face face, uint32_t dpi,
|
|||
m_tex =
|
||||
gf->newStaticArrayTexture(TEXMAP_DIM, finalHeight, fullTexmapLayers + 1,
|
||||
boo::TextureFormat::RGBA8, texmap.get(), bufSz);
|
||||
m_token = gf->commit();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -457,6 +458,7 @@ FontAtlas::FontAtlas(boo::IGraphicsDataFactory* gf, FT_Face face, uint32_t dpi,
|
|||
m_tex =
|
||||
gf->newStaticArrayTexture(TEXMAP_DIM, finalHeight, fullTexmapLayers + 1,
|
||||
boo::TextureFormat::I8, texmap.get(), bufSz);
|
||||
m_token = gf->commit();
|
||||
}
|
||||
|
||||
buildKernTable(face);
|
||||
|
@ -576,6 +578,7 @@ FontAtlas::FontAtlas(boo::IGraphicsDataFactory* gf, FT_Face face, uint32_t dpi,
|
|||
m_tex =
|
||||
gf->newStaticArrayTexture(TEXMAP_DIM, finalHeight, fullTexmapLayers + 1,
|
||||
boo::TextureFormat::RGBA8, texmap.get(), bufSz);
|
||||
m_token = gf->commit();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -656,6 +659,7 @@ FontAtlas::FontAtlas(boo::IGraphicsDataFactory* gf, FT_Face face, uint32_t dpi,
|
|||
m_tex =
|
||||
gf->newStaticArrayTexture(TEXMAP_DIM, finalHeight, fullTexmapLayers + 1,
|
||||
boo::TextureFormat::I8, texmap.get(), bufSz);
|
||||
m_token = gf->commit();
|
||||
}
|
||||
|
||||
buildKernTable(face);
|
||||
|
|
|
@ -17,7 +17,6 @@ void ViewResources::init(boo::IGraphicsDataFactory* factory, FontCache* fcache,
|
|||
m_heading14 = fcache->prepMainFont(factory, LatinAndJapaneseCharFilter, false, 14.f, dpi);
|
||||
m_heading18 = fcache->prepMainFont(factory, LatinAndJapaneseCharFilter, false, 18.f, dpi);
|
||||
m_curveFont = fcache->prepCurvesFont(factory, AllCharFilter, false, 8.f, dpi);
|
||||
m_fontData = factory->commit();
|
||||
switch (factory->platform())
|
||||
{
|
||||
case boo::IGraphicsDataFactory::Platform::OGL:
|
||||
|
@ -49,7 +48,6 @@ void ViewResources::resetPixelFactor(float pf)
|
|||
m_heading14 = m_fcache->prepMainFont(m_factory, LatinAndJapaneseCharFilter, false, 14.f, dpi);
|
||||
m_heading18 = m_fcache->prepMainFont(m_factory, LatinAndJapaneseCharFilter, false, 18.f, dpi);
|
||||
m_curveFont = m_fcache->prepCurvesFont(m_factory, AllCharFilter, false, 8.f, dpi);
|
||||
m_fontData = m_factory->commit();
|
||||
m_fcache->closeBuiltinFonts();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue