Change: Support side-by-side fallback FontCaches instead of hierarchical. (#13303)
The text layouter system can now support using different fonts for different glyphs, including mixing scalable and sprite glyphs.
This commit is contained in:
@@ -303,10 +303,16 @@ void SurveyConfiguration(nlohmann::json &survey)
|
||||
*/
|
||||
void SurveyFont(nlohmann::json &survey)
|
||||
{
|
||||
survey["small"] = FontCache::Get(FS_SMALL)->GetFontName();
|
||||
survey["medium"] = FontCache::Get(FS_NORMAL)->GetFontName();
|
||||
survey["large"] = FontCache::Get(FS_LARGE)->GetFontName();
|
||||
survey["mono"] = FontCache::Get(FS_MONO)->GetFontName();
|
||||
for (FontSize fs = FS_BEGIN; fs < FS_END; fs++) {
|
||||
const FontCacheSubSetting *setting = GetFontCacheSubSetting(fs);
|
||||
auto &font = survey[std::string(FontSizeToName(fs))];
|
||||
font["configured"]["font"] = setting->font;
|
||||
font["configured"]["size"] = setting->size;
|
||||
}
|
||||
for (const auto &fc : FontCache::Get()) {
|
||||
auto &font = survey[std::string(FontSizeToName(fc->GetSize()))];
|
||||
font["active"].push_back(fc->GetFontName());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user