mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
CNeutrinoFonts: use neutrino debug output as default with line numbers
Origin commit data
------------------
Branch: ni/coolstream
Commit: b9e04a4999
Author: Thilo Graf <dbt@novatux.de>
Date: 2015-03-18 (Wed, 18 Mar 2015)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -117,7 +117,7 @@ void CNeutrinoFonts::SetupDynamicFonts(bool initRenderClass/*=true*/)
|
|||||||
dynFontStyle[0] = g_dynFontRenderer->AddFont(fontDescr.filename.c_str());
|
dynFontStyle[0] = g_dynFontRenderer->AddFont(fontDescr.filename.c_str());
|
||||||
|
|
||||||
fontDescr.name = g_dynFontRenderer->getFamily(fontDescr.filename.c_str());
|
fontDescr.name = g_dynFontRenderer->getFamily(fontDescr.filename.c_str());
|
||||||
dprintf(DEBUG_NORMAL, " dynamic font family: %s\n", fontDescr.name.c_str());
|
dprintf(DEBUG_NORMAL, "[CNeutrinoFonts] [%s - %d] dynamic font family: %s\n", __func__, __LINE__, fontDescr.name.c_str());
|
||||||
dynFontStyle[1] = "Bold Regular";
|
dynFontStyle[1] = "Bold Regular";
|
||||||
|
|
||||||
g_dynFontRenderer->AddFont(fontDescr.filename.c_str(), true); // make italics
|
g_dynFontRenderer->AddFont(fontDescr.filename.c_str(), true); // make italics
|
||||||
@@ -135,14 +135,14 @@ void CNeutrinoFonts::SetupNeutrinoFonts(bool initRenderClass/*=true*/)
|
|||||||
old_fontDescr.size_offset = fontDescr.size_offset;
|
old_fontDescr.size_offset = fontDescr.size_offset;
|
||||||
old_fontDescr.filename = fontDescr.filename;
|
old_fontDescr.filename = fontDescr.filename;
|
||||||
fontDescr.filename = "";
|
fontDescr.filename = "";
|
||||||
dprintf(DEBUG_NORMAL, "font file: %s\n", g_settings.font_file.c_str());
|
dprintf(DEBUG_NORMAL, "[CNeutrinoFonts] [%s - %d] font file: %s\n", __func__, __LINE__, g_settings.font_file.c_str());
|
||||||
if (access(g_settings.font_file.c_str(), F_OK)) {
|
if (access(g_settings.font_file.c_str(), F_OK)) {
|
||||||
if (!access(FONTDIR"/neutrino.ttf", F_OK)) {
|
if (!access(FONTDIR"/neutrino.ttf", F_OK)) {
|
||||||
fontDescr.filename = FONTDIR"/neutrino.ttf";
|
fontDescr.filename = FONTDIR"/neutrino.ttf";
|
||||||
g_settings.font_file = fontDescr.filename;
|
g_settings.font_file = fontDescr.filename;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fprintf( stderr,"[neutrino] font file [%s] not found\n neutrino exit\n",FONTDIR"/neutrino.ttf");
|
fprintf( stderr,"[CNeutrinoFonts] [%s - %d] font file [%s] not found\n neutrino exit\n", __func__, __LINE__, FONTDIR"/neutrino.ttf");
|
||||||
_exit(0);
|
_exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -154,7 +154,7 @@ void CNeutrinoFonts::SetupNeutrinoFonts(bool initRenderClass/*=true*/)
|
|||||||
old_fontDescr.name = fontDescr.name;
|
old_fontDescr.name = fontDescr.name;
|
||||||
fontDescr.name = "";
|
fontDescr.name = "";
|
||||||
fontDescr.name = g_fontRenderer->getFamily(fontDescr.filename.c_str());
|
fontDescr.name = g_fontRenderer->getFamily(fontDescr.filename.c_str());
|
||||||
dprintf(DEBUG_NORMAL, "standard font family: %s\n", fontDescr.name.c_str());
|
dprintf(DEBUG_NORMAL, "[CNeutrinoFonts] [%s - %d] standard font family: %s\n", __func__, __LINE__, fontDescr.name.c_str());
|
||||||
fontStyle[1] = "Bold Regular";
|
fontStyle[1] = "Bold Regular";
|
||||||
|
|
||||||
g_fontRenderer->AddFont(fontDescr.filename.c_str(), true); // make italics
|
g_fontRenderer->AddFont(fontDescr.filename.c_str(), true); // make italics
|
||||||
@@ -209,10 +209,11 @@ void CNeutrinoFonts::refreshDynFont(int dx, int dy, std::string text, int style,
|
|||||||
Font *dynFont = g_dynFontRenderer->getFont(fontDescr.name.c_str(), dynFontStyle[style].c_str(), dynSize);
|
Font *dynFont = g_dynFontRenderer->getFont(fontDescr.name.c_str(), dynFontStyle[style].c_str(), dynSize);
|
||||||
dyn_font->font = dynFont;
|
dyn_font->font = dynFont;
|
||||||
dyn_font->size = dynSize;
|
dyn_font->size = dynSize;
|
||||||
if (dyn_font->size != dynSize)
|
if (dyn_font->size != dynSize){
|
||||||
printf("##### [%s] change %s_font size old %d to new %d, index: %u\n", __FUNCTION__, (isShare)?"share":"dyn", oldSize, dyn_font->size, index);
|
dprintf(DEBUG_NORMAL, "[CNeutrinoFonts] [%s - %d] change %s_font size old %d to new %d, index: %u\n", __func__, __LINE__, (isShare)?"share":"dyn", oldSize, dyn_font->size, index);
|
||||||
else
|
}else{
|
||||||
printf("##### [%s] refresh %s_font size %d, index: %u\n", __FUNCTION__, (isShare)?"share":"dyn", dyn_font->size, index);
|
dprintf(DEBUG_NORMAL, "[CNeutrinoFonts] [%s - %d] refresh %s_font size %d, index: %u\n",__func__, __LINE__, (isShare)?"share":"dyn", dyn_font->size, index);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int CNeutrinoFonts::getFontHeight(Font* fnt)
|
int CNeutrinoFonts::getFontHeight(Font* fnt)
|
||||||
|
Reference in New Issue
Block a user