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(...)


Origin commit data
------------------
Commit: 0bcb7bcfae
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2013-06-28 (Fri, 28 Jun 2013)

Origin message was:
------------------
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:
Michael Liebmann
2013-06-28 05:52:23 +02:00
committed by Thilo Graf
parent 09d3ccc359
commit 10cb9d1953
3 changed files with 285 additions and 0 deletions

View File

@@ -1525,6 +1525,7 @@ void CNeutrinoApp::SetupFonts()
if (neutrinoFonts == NULL)
neutrinoFonts = CNeutrinoFonts::getInstance();
neutrinoFonts->SetupNeutrinoFonts();
neutrinoFonts->refreshDynFonts();
/* recalculate infobar position */
if (g_InfoViewer)