diff options
| author | Ray <raysan5@gmail.com> | 2019-09-12 16:30:39 +0200 |
|---|---|---|
| committer | Ray <raysan5@gmail.com> | 2019-09-12 16:30:39 +0200 |
| commit | d9d9c6111b7dd7de65f178ca6375fe80a719ac86 (patch) | |
| tree | e7ba8b0e61810cd01d26f4c01d1f0543f6520214 | |
| parent | 8d6f179062a009d41d60ca5ab4ddd9af961efeec (diff) | |
| download | raylib-d9d9c6111b7dd7de65f178ca6375fe80a719ac86.tar.gz raylib-d9d9c6111b7dd7de65f178ca6375fe80a719ac86.zip | |
RENAMED: text_sprite_font > text_font_spritefont
| -rw-r--r-- | examples/Makefile | 6 | ||||
| -rw-r--r-- | examples/text/text_font_spritefont.c (renamed from examples/text/text_sprite_fonts.c) | 13 | ||||
| -rw-r--r-- | examples/text/text_font_spritefont.png (renamed from examples/text/text_sprite_fonts.png) | bin | 19567 -> 19567 bytes |
3 files changed, 14 insertions, 5 deletions
diff --git a/examples/Makefile b/examples/Makefile index 26cb2328..278cdee3 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -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 \ diff --git a/examples/text/text_sprite_fonts.c b/examples/text/text_font_spritefont.c index b7c9ab10..dff2b47a 100644 --- a/examples/text/text_sprite_fonts.c +++ b/examples/text/text_font_spritefont.c @@ -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..."; diff --git a/examples/text/text_sprite_fonts.png b/examples/text/text_font_spritefont.png Binary files differindex 1bd4aa03..1bd4aa03 100644 --- a/examples/text/text_sprite_fonts.png +++ b/examples/text/text_font_spritefont.png |
