Skip to content

Commit 147b02a

Browse files
R-YaTianfincs
authored andcommitted
Fix text width calculate for 'C2D_TextFontParseLine'
1 parent 02f82d0 commit 147b02a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/text.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ const char* C2D_TextFontParseLine(C2D_Text* text, C2D_Font font, C2D_TextBuf buf
192192
wordNum++;
193193

194194
text->end = buf->glyphCount;
195-
text->width *= s_textScale;
195+
text->width *= font ? font->textScale : s_textScale;
196196
text->lines = 1;
197197
text->words = wordNum;
198198
return (const char*)p;

0 commit comments

Comments
 (0)