about summary refs log tree commit diff
path: root/src/engine/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/client')
-rw-r--r--src/engine/client/text.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/engine/client/text.cpp b/src/engine/client/text.cpp
index 828aa3fd..d24c41ae 100644
--- a/src/engine/client/text.cpp
+++ b/src/engine/client/text.cpp
@@ -688,21 +688,20 @@ public:
 
 					if(pChr)
 					{
+						Advance = pChr->m_AdvanceX + Kerning(pFont, Character, Nextcharacter)*Scale;
+						if(pCursor->m_Flags&TEXTFLAG_STOP_AT_END && DrawX+Advance*Size-pCursor->m_StartX > pCursor->m_LineWidth)
+						{
+							// we hit the end of the line, no more to render or count
+							pCurrent = pEnd;
+							break;
+						}
+
 						if(pCursor->m_Flags&TEXTFLAG_RENDER)
 						{
 							Graphics()->QuadsSetSubset(pChr->m_aUvs[0], pChr->m_aUvs[1], pChr->m_aUvs[2], pChr->m_aUvs[3]);
 							IGraphics::CQuadItem QuadItem(DrawX+pChr->m_OffsetX*Size, DrawY+pChr->m_OffsetY*Size, pChr->m_Width*Size, pChr->m_Height*Size);
 							Graphics()->QuadsDrawTL(&QuadItem, 1);
 						}
-
-						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)
-					{
-						// we hit the end of the line, no more to render or count
-						pCurrent = pEnd;
-						break;
 					}
 
 					DrawX += Advance*Size;