aboutsummaryrefslogtreecommitdiff
path: root/guilib
diff options
context:
space:
mode:
authorCrystalPT <CrystalPT@svn>2010-08-23 23:10:15 +0000
committerCrystalPT <CrystalPT@svn>2010-08-23 23:10:15 +0000
commit80ea2980d753fe89dd7806a529fad667a37301fb (patch)
tree0465da0941350b36e7f734b0ef03088a4a5bb96b /guilib
parente328d79343d9de590684a800f75766480f41491a (diff)
fixed: missing outlines (ticket #9713, thanks sportica)
(cherry picked from commit 275c23e4e5da4bd284f2c1208e4c7e093b9b90b8) git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/Dharma@33078 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);