Browse Source

RENAMED: text_sprite_font > text_font_spritefont

pull/964/head
Ray 5 years ago
parent
commit
d9d9c6111b
3 changed files with 14 additions and 5 deletions
  1. +3
    -3
      examples/Makefile
  2. +11
    -2
      examples/text/text_font_spritefont.c
  3. +0
    -0
      examples/text/text_font_spritefont.png

+ 3
- 3
examples/Makefile View File

@ -385,9 +385,9 @@ EXAMPLES = \
shapes/shapes_draw_circle_sector \
shapes/shapes_draw_rectangle_rounded \
text/text_raylib_fonts \
text/text_sprite_fonts \
text/text_ttf_loading \
text/text_bmfont_ttf \
text/text_font_spritefont \
text/text_font_loading \
text/text_font_filters \
text/text_font_sdf \
text/text_format_text \
text/text_input_box \

examples/text/text_sprite_fonts.c → examples/text/text_font_spritefont.c View File

@ -1,6 +1,15 @@
/*******************************************************************************************
*
* raylib [text] example - Font loading and usage
* raylib [text] example - Sprite font loading
*
* Loaded sprite fonts have been generated following XNA SpriteFont conventions:
* - Characters must be ordered starting with character 32 (Space)
* - Every character must be contained within the same Rectangle height
* - Every character and every line must be separated the same distance
* - Rectangles must be defined by a MAGENTA color background
*
* If following this constraints, a font can be provided just by an image,
* this is quite handy to avoid additional information files (like BMFonts use).
*
* This example has been created using raylib 1.0 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
@ -18,7 +27,7 @@ int main(void)
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [text] example - sprite fonts usage");
InitWindow(screenWidth, screenHeight, "raylib [text] example - sprite font loading");
const char msg1[50] = "THIS IS A custom SPRITE FONT...";
const char msg2[50] = "...and this is ANOTHER CUSTOM font...";

examples/text/text_sprite_fonts.png → examples/text/text_font_spritefont.png View File


||||||
x
 
000:0
Loading…
Cancel
Save