From d41e3141f194d82ad0f6667aadac2d96d69bb770 Mon Sep 17 00:00:00 2001 From: Ray Date: Sat, 2 Sep 2023 11:48:19 +0200 Subject: [PATCH] REVIEWED: Added `SetTextLineSpacing()` to multiline examples --- examples/text/text_codepoints_loading.c | 2 ++ examples/text/text_font_loading.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/examples/text/text_codepoints_loading.c b/examples/text/text_codepoints_loading.c index 1f3db0cf3..376b4972a 100644 --- a/examples/text/text_codepoints_loading.c +++ b/examples/text/text_codepoints_loading.c @@ -52,6 +52,8 @@ int main(void) // Set bilinear scale filter for better font scaling SetTextureFilter(font.texture, TEXTURE_FILTER_BILINEAR); + SetTextLineSpacing(54); // Set line spacing for multiline text (when line breaks are included '\n') + // Free codepoints, atlas has already been generated free(codepointsNoDups); diff --git a/examples/text/text_font_loading.c b/examples/text/text_font_loading.c index 2ded64f09..a3ff988e9 100644 --- a/examples/text/text_font_loading.c +++ b/examples/text/text_font_loading.c @@ -47,6 +47,8 @@ int main(void) // NOTE: We define a font base size of 32 pixels tall and up-to 250 characters Font fontTtf = LoadFontEx("resources/pixantiqua.ttf", 32, 0, 250); + SetTextLineSpacing(48); // Set line spacing for multiline text (when line breaks are included '\n') + bool useTtf = false; SetTargetFPS(60); // Set our game to run at 60 frames-per-second