mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 09:51:13 +02:00
fontrenderer: a bit less bad hack to decrease boot
Origin commit data
------------------
Commit: 795c131553
Author: vanhofen <vanhofen@gmx.de>
Date: 2022-01-09 (Sun, 09 Jan 2022)
Origin message was:
------------------
- fontrenderer: a bit less bad hack to decrease boot
This commit is contained in:
@@ -289,20 +289,21 @@ return 0;
|
|||||||
int tM=glyph->top;
|
int tM=glyph->top;
|
||||||
|
|
||||||
fontwidth = glyph->width;
|
fontwidth = glyph->width;
|
||||||
#if defined BOXMODEL_CST_HD1
|
std::string fontname = face->family_name;
|
||||||
// too hard loop below for HD1
|
if (fontname.find("Font Awesome") != std::string::npos)
|
||||||
fontwidth_widest = fontwidth;
|
|
||||||
#else
|
|
||||||
// walk through all chars to find fontwidth_widest
|
|
||||||
FT_UInt gindex = 0;
|
|
||||||
FT_ULong charcode = FT_Get_First_Char(face, &gindex);
|
|
||||||
while (gindex != 0)
|
|
||||||
{
|
{
|
||||||
getGlyphBitmap(gindex, &glyph);
|
// walk through all chars to find fontwidth_widest
|
||||||
fontwidth_widest = std::max(fontwidth, (int)glyph->width);
|
FT_UInt gindex = 0;
|
||||||
charcode = FT_Get_Next_Char(face, charcode, &gindex);
|
FT_ULong charcode = FT_Get_First_Char(face, &gindex);
|
||||||
|
while (gindex != 0)
|
||||||
|
{
|
||||||
|
getGlyphBitmap(gindex, &glyph);
|
||||||
|
fontwidth_widest = std::max(fontwidth, (int)glyph->width);
|
||||||
|
charcode = FT_Get_Next_Char(face, charcode, &gindex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
else
|
||||||
|
fontwidth_widest = fontwidth;
|
||||||
//printf("Font::setSize() %s: fontwidth=%d fontwidth_widest=%d\n", face->family_name, fontwidth, fontwidth_widest);
|
//printf("Font::setSize() %s: fontwidth=%d fontwidth_widest=%d\n", face->family_name, fontwidth, fontwidth_widest);
|
||||||
|
|
||||||
index=FT_Get_Char_Index(face, 'g'); // "g" gives us descender
|
index=FT_Get_Char_Index(face, 'g'); // "g" gives us descender
|
||||||
|
Reference in New Issue
Block a user