about summary refs log tree commit diff
path: root/src/engine/client
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2010-08-18 00:21:38 +0200
committeroy <Tom_Adams@web.de>2010-08-18 00:21:38 +0200
commit0f72fd19ef9f03b335c9bc4e4dae764079e1f30d (patch)
tree099ed484cb699b2b9a36d8c04448cde1f58bc43f /src/engine/client
parentcabecb7fa937b5e4efa859ea62722468f91a5089 (diff)
downloadzcatch-0f72fd19ef9f03b335c9bc4e4dae764079e1f30d.tar.gz
zcatch-0f72fd19ef9f03b335c9bc4e4dae764079e1f30d.zip
fixed text rendering problem. Closes #12
Diffstat (limited to 'src/engine/client')
-rw-r--r--src/engine/client/text.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/engine/client/text.cpp b/src/engine/client/text.cpp
index ef741c12..bdf71dbb 100644
--- a/src/engine/client/text.cpp
+++ b/src/engine/client/text.cpp
@@ -570,6 +570,8 @@ public:
 
 		pSizeData = GetSize(pFont, ActualSize);
 		RenderSetup(pFont, ActualSize);
+
+		float Scale = 1/pSizeData->m_FontSize;
 		
 		// set length
 		if(Length < 0)
@@ -679,7 +681,7 @@ public:
 							Graphics()->QuadsDrawTL(&QuadItem, 1);
 						}
 
-						Advance = pChr->m_AdvanceX + Kerning(pFont, Character, Nextcharacter)/Size;
+						Advance = pChr->m_AdvanceX + Kerning(pFont, Character, Nextcharacter)*Scale;
 					}
 									
 					if(pCursor->m_Flags&TEXTFLAG_STOP_AT_END && DrawX+(Advance+pChr->m_Width)*Size-pCursor->m_StartX > pCursor->m_LineWidth)