mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
CNeutrinoFonts: Use separate font renderer for dynamic fonts
- delete / initialize font renderer only if necessary
(e.g. start program, change the font file, change the scaling)
Origin commit data
------------------
Branch: ni/coolstream
Commit: e473df6a43
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2013-07-26 (Fri, 26 Jul 2013)
Origin message was:
------------------
CNeutrinoFonts: Use separate font renderer for dynamic fonts
- delete / initialize font renderer only if necessary
(e.g. start program, change the font file, change the scaling)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -194,7 +194,7 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
{
|
||||
strcpy(g_settings.font_file, fileBrowser.getSelectedFile()->Name.c_str());
|
||||
printf("[neutrino] new font file %s\n", fileBrowser.getSelectedFile()->Name.c_str());
|
||||
CNeutrinoApp::getInstance()->SetupFonts();
|
||||
CNeutrinoApp::getInstance()->SetupFonts(CNeutrinoFonts::FONTSETUP_ALL);
|
||||
osdFontFile = "(" + getBaseName(fileBrowser.getSelectedFile()->Name) + ")";
|
||||
mfFontFile->setOption(osdFontFile.c_str());
|
||||
}
|
||||
@@ -211,7 +211,7 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
strcpy(g_settings.ttx_font_file, fileBrowser.getSelectedFile()->Name.c_str());
|
||||
ttx_font_file = fileBrowser.getSelectedFile()->Name;
|
||||
printf("[neutrino] ttx font file %s\n", fileBrowser.getSelectedFile()->Name.c_str());
|
||||
CNeutrinoApp::getInstance()->SetupFonts();
|
||||
CNeutrinoApp::getInstance()->SetupFonts(CNeutrinoFonts::FONTSETUP_NEUTRINO_FONT | CNeutrinoFonts::FONTSETUP_NEUTRINO_FONT_INST);
|
||||
osdTtxFontFile = "(" + getBaseName(fileBrowser.getSelectedFile()->Name) + ")";
|
||||
mfTtxFontFile->setOption(osdTtxFontFile.c_str());
|
||||
}
|
||||
@@ -253,7 +253,7 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
printf("[neutrino] new font scale settings x: %d%% y: %d%%\n", xre, yre);
|
||||
g_settings.screen_xres = xre;
|
||||
g_settings.screen_yres = yre;
|
||||
CNeutrinoApp::getInstance()->SetupFonts();
|
||||
CNeutrinoApp::getInstance()->SetupFonts(CNeutrinoFonts::FONTSETUP_NEUTRINO_FONT | CNeutrinoFonts::FONTSETUP_NEUTRINO_FONT_INST);
|
||||
}
|
||||
//return menu_return::RETURN_REPAINT;
|
||||
return res;
|
||||
|
Reference in New Issue
Block a user