From 6e76baa6a93d039e132fe11eedc74958971bf4a3 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 1 Sep 2021 23:11:31 +0200 Subject: WARNING: BREAKING: RENAMED: Font struct variables RENAMED: GetCodepointsCount() -> GetCodepointCount() RENAMED: GetTouchPointsCount() -> GetTouchPointCount() --- examples/text/text_rectangle_bounds.c | 2 +- examples/text/text_unicode.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/text/text_rectangle_bounds.c b/examples/text/text_rectangle_bounds.c index 0da1a8ab..b4884fb3 100644 --- a/examples/text/text_rectangle_bounds.c +++ b/examples/text/text_rectangle_bounds.c @@ -166,7 +166,7 @@ static void DrawTextBoxedSelectable(Font font, const char *text, Rectangle rec, float glyphWidth = 0; if (codepoint != '\n') { - glyphWidth = (font.chars[index].advanceX == 0) ? font.recs[index].width*scaleFactor : font.chars[index].advanceX*scaleFactor; + glyphWidth = (font.glyphs[index].advanceX == 0) ? font.recs[index].width*scaleFactor : font.glyphs[index].advanceX*scaleFactor; if (i + 1 < length) glyphWidth = glyphWidth + spacing; } diff --git a/examples/text/text_unicode.c b/examples/text/text_unicode.c index 883d2a5c..4b6b7780 100644 --- a/examples/text/text_unicode.c +++ b/examples/text/text_unicode.c @@ -277,7 +277,7 @@ int main(int argc, char **argv) // Draw the info text below the main message int size = (int)strlen(messages[message].text); - int len = GetCodepointsCount(messages[message].text); + int len = GetCodepointCount(messages[message].text); const char *info = TextFormat("%s %u characters %i bytes", messages[message].language, len, size); sz = MeasureTextEx(GetFontDefault(), info, 10, 1.0f); Vector2 pos = { textRect.x + textRect.width - sz.x, msgRect.y + msgRect.height - sz.y - 2 }; @@ -367,7 +367,7 @@ static void DrawTextBoxedSelectable(Font font, const char *text, Rectangle rec, float glyphWidth = 0; if (codepoint != '\n') { - glyphWidth = (font.chars[index].advanceX == 0) ? font.recs[index].width*scaleFactor : font.chars[index].advanceX*scaleFactor; + glyphWidth = (font.glyphs[index].advanceX == 0) ? font.recs[index].width*scaleFactor : font.glyphs[index].advanceX*scaleFactor; if (i + 1 < length) glyphWidth = glyphWidth + spacing; } -- cgit v1.2.3