mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
Add dynamic fonts to CNeutrinoFonts
- Dynamic fonts with their size matched to a given text box. The display size is retained even when changing the font size factor. - "Normal" dynamic fonts, characterized by FONT_ID_SHARE in CNeutrinoFonts::getDynFont() can be used by several objects simultaneously. That is, if the calculated font size and font style are the same, the existing font is used. - Dynamic font for exclusive application will only be used by an object. For this, a FontID (FONT_ID_xxx, defined in src/driver/neutrinofonts.h) in CNeutrinoFonts::getDynFont() is specified. - Objects with dynamic font for exclusive application can resize at run time, the font size will be adjusted accordingly. - The return value of CNeutrinoFonts::getDynFont() is a pointer to a font, for example: Font** font = CNeutrinoFonts::getInstance()->getDynFont(...); (*font)->RenderString(...)
This commit is contained in:
@@ -1525,6 +1525,7 @@ void CNeutrinoApp::SetupFonts()
|
||||
if (neutrinoFonts == NULL)
|
||||
neutrinoFonts = CNeutrinoFonts::getInstance();
|
||||
neutrinoFonts->SetupNeutrinoFonts();
|
||||
neutrinoFonts->refreshDynFonts();
|
||||
|
||||
/* recalculate infobar position */
|
||||
if (g_InfoViewer)
|
||||
|
Reference in New Issue
Block a user