#4256 Update fonts in Project and views when changing preferences

This commit is contained in:
Gaute Lindkvist
2019-04-10 12:49:20 +02:00
parent 0e0d78104b
commit 798e3ff19e
32 changed files with 411 additions and 129 deletions

View File

@@ -81,3 +81,29 @@ cvf::ref<caf::FixedAtlasFont> RiaFontCache::getFont(FontSize size)
}
return ms_fonts[size];
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
int RiaFontCache::getPointSize(FontSize fontSize)
{
switch (fontSize)
{
case RiaFontCache::FONT_SIZE_8:
return 8;
case RiaFontCache::FONT_SIZE_10:
return 10;
case RiaFontCache::FONT_SIZE_12:
return 12;
case RiaFontCache::FONT_SIZE_14:
return 14;
case RiaFontCache::FONT_SIZE_16:
return 16;
case RiaFontCache::FONT_SIZE_24:
return 24;
case RiaFontCache::FONT_SIZE_32:
return 32;
default:
return 16;
}
}