diff --git a/System/Libraries/Graphics2D.HC b/System/Libraries/Graphics2D.HC index 275f0f8..a61585d 100644 --- a/System/Libraries/Graphics2D.HC +++ b/System/Libraries/Graphics2D.HC @@ -1180,7 +1180,7 @@ I64 Y2Pos(CDC* src) return -1; } -I64 @get_truetype_text_width(U8* font_name, I64 size, U8* text) +I64 @get_truetype_text_width(U8* font_name, I64 size, I32* text, I32* advance = NULL) { stbtt_fontinfo* font = Fonts->@(font_name); if (!font) { @@ -1189,7 +1189,7 @@ I64 @get_truetype_text_width(U8* font_name, I64 size, U8* text) I64 res = 0; CDC* dc = DCNew(Display.Width(), (size * 2)); Free(dc->body); - dc->body = @stbtt_RenderText(font, dc->width_internal, dc->height, ToI64(size * 1.2), text); + dc->body = @stbtt_RenderText(font, dc->width_internal, dc->height, ToI64(size * 1.2), text, advance); dc->width -= 16; res = X2Pos(dc) - X1Pos(dc); DCDel(dc);