mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 01:41:12 +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(...)
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:
@@ -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