Skip to content

Commit

Permalink
Fix text width calculate for 'C2D_TextFontParseLine'
Browse files Browse the repository at this point in the history
  • Loading branch information
R-YaTian authored and fincs committed Jan 26, 2025
1 parent 02f82d0 commit 147b02a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/text.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ const char* C2D_TextFontParseLine(C2D_Text* text, C2D_Font font, C2D_TextBuf buf
wordNum++;

text->end = buf->glyphCount;
text->width *= s_textScale;
text->width *= font ? font->textScale : s_textScale;
text->lines = 1;
text->words = wordNum;
return (const char*)p;
Expand Down

0 comments on commit 147b02a

Please sign in to comment.