aboutsummaryrefslogtreecommitdiff
path: root/guilib
diff options
context:
space:
mode:
authorCrystalPT <CrystalPT@svn>2010-08-23 05:48:28 +0000
committerCrystalPT <CrystalPT@svn>2010-08-23 05:48:28 +0000
commitbcf65f2115b1d198573b6c81734237f4306325a8 (patch)
treef6ba61e487ae997a32e0e52df300c928f6a151b1 /guilib
parent66bda2c7c35b3ffe82c8d6d2d78241eb5667beb8 (diff)
fixed: missing outlines (ticket #9713, thanks sportica)
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@33051 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib')
-rw-r--r--guilib/GUIFontTTF.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/guilib/GUIFontTTF.cpp b/guilib/GUIFontTTF.cpp
index 2524b07092..7befa8609f 100644
--- a/guilib/GUIFontTTF.cpp
+++ b/guilib/GUIFontTTF.cpp
@@ -235,21 +235,24 @@ bool CGUIFontTTFBase::Load(const CStdString& strFilename, float height, float as
if (!m_face)
return false;
+ // grab the maximum cell height and width
+ unsigned int m_cellWidth = m_face->bbox.xMax - m_face->bbox.xMin;
+ m_cellHeight = std::max<unsigned int>(m_face->bbox.yMax - m_face->bbox.yMin, m_face->ascender - m_face->descender);
+ m_cellBaseLine = std::max<unsigned int>(m_face->bbox.yMax, m_face->ascender);
+
if (border)
{
m_stroker = g_freeTypeLibrary.GetStroker();
FT_Pos strength = FT_MulFix( m_face->units_per_EM, m_face->size->metrics.y_scale) / 12;
- if (strength < 128) strength = 128;
+ if (strength < 128)
+ strength = 128;
+ m_cellHeight += 2*strength;
if (m_stroker)
FT_Stroker_Set(m_stroker, strength, FT_STROKER_LINECAP_ROUND, FT_STROKER_LINEJOIN_ROUND, 0);
}
- // grab the maximum cell height and width
- unsigned int m_cellWidth = m_face->bbox.xMax - m_face->bbox.xMin;
- m_cellHeight = m_face->bbox.yMax - m_face->bbox.yMin;
- m_cellBaseLine = m_face->bbox.yMax;
unsigned int ydpi = g_freeTypeLibrary.GetDPI();
unsigned int xdpi = (unsigned int)MathUtils::round_int(ydpi * aspect);