handle generation and rendering of MSDF fonts

This commit is contained in:
fibref
2026-08-13 20:35:23 +08:00
parent 74327aa8cd
commit f9cb513fb7
3 changed files with 13 additions and 9 deletions
+1 -1
View File
@@ -172,7 +172,7 @@ void TextRender::UpdateLayout()
// Pick a font (remove DPI text scale as the text is being placed in the world)
auto font = Font->CreateFont(_size);
float scale = _layoutOptions.Scale / FontManager::FontScale;
float scale = _layoutOptions.Scale / FontManager::FontScale * (Font->GetOptions().RasterMode == FontRasterMode::MSDF ? _size / Font->GetOptions().MSDFSize : 1.0f);
// Prepare
FontTextureAtlas* fontAtlas = nullptr;