aboutsummaryrefslogtreecommitdiff
path: root/guilib/GUIFontTTF.cpp
diff options
context:
space:
mode:
authortheuni <theuni@svn>2010-01-03 20:39:28 +0000
committertheuni <theuni@svn>2010-01-03 20:39:28 +0000
commit63a12107368b6454cb985274ff72d99727c4a5d8 (patch)
tree6191f81b88e7fdabcd03da6d037603617269ac83 /guilib/GUIFontTTF.cpp
parent68f7db0021a28d6f01c939bc3ffee0068bded916 (diff)
Revert r23267 "support proper kerning of fonts".
Causes crazy-high cpu usage with some fonts (See rapier 3.0). Needs a proper fix. Ping jmarshall/yuvalt. This reverts commit 499a5db172a4032eb0e4fbca0c0aa14555d56e3b. git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@26325 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib/GUIFontTTF.cpp')
-rw-r--r--guilib/GUIFontTTF.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/guilib/GUIFontTTF.cpp b/guilib/GUIFontTTF.cpp
index 0f0f4f03c5..bdd72ce948 100644
--- a/guilib/GUIFontTTF.cpp
+++ b/guilib/GUIFontTTF.cpp
@@ -336,9 +336,6 @@ void CGUIFontTTFBase::DrawTextInternal(float x, float y, const vecColors &colors
}
float cursorX = 0; // current position along the line
- Character* previousCh = NULL;
- FT_Vector delta;
-
for (vecText::const_iterator pos = text.begin(); pos != text.end(); pos++)
{
// If starting text on a new line, determine justification effects
@@ -374,13 +371,6 @@ void CGUIFontTTFBase::DrawTextInternal(float x, float y, const vecColors &colors
else if (maxPixelWidth > 0 && cursorX > maxPixelWidth)
break; // exceeded max allowed width - stop rendering
- if (previousCh)
- {
- FT_Get_Kerning(m_face, previousCh->glyphIndex, ch->glyphIndex,
- FT_KERNING_DEFAULT, &delta);
- cursorX += (float) (delta.x / 64);
- }
-
RenderCharacter(startX + cursorX, startY, ch, color, !scrolling);
if ( alignment & XBFONT_JUSTIFIED )
{
@@ -391,8 +381,6 @@ void CGUIFontTTFBase::DrawTextInternal(float x, float y, const vecColors &colors
}
else
cursorX += ch->advance;
-
- previousCh = ch;
}
End();
@@ -590,7 +578,6 @@ bool CGUIFontTTFBase::CacheCharacter(wchar_t letter, uint32_t style, Character *
ch->right = ch->left + bitmap.width;
ch->bottom = ch->top + bitmap.rows;
ch->advance = (float)MathUtils::round_int( (float)m_face->glyph->advance.x / 64 );
- ch->glyphIndex = glyph_index;
// we need only render if we actually have some pixels
if (bitmap.width * bitmap.rows)