浏览代码

REVIEWED: Added `SetTextLineSpacing()` to multiline examples

pull/3284/head
Ray 1年前
父节点
当前提交
d41e3141f1
共有 2 个文件被更改,包括 4 次插入0 次删除
  1. +2
    -0
      examples/text/text_codepoints_loading.c
  2. +2
    -0
      examples/text/text_font_loading.c

+ 2
- 0
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);

+ 2
- 0
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

正在加载...
取消
保存