diff options
| author | Ray <[email protected]> | 2019-09-12 16:29:26 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2019-09-12 16:29:26 +0200 |
| commit | 8d6f179062a009d41d60ca5ab4ddd9af961efeec (patch) | |
| tree | 74308c8259d8edf0184e27961d8990b291abf7ec /examples/text | |
| parent | 7e08b312d5b8762fdd17d5d254cb592e97dbd332 (diff) | |
| download | raylib-8d6f179062a009d41d60ca5ab4ddd9af961efeec.tar.gz raylib-8d6f179062a009d41d60ca5ab4ddd9af961efeec.zip | |
RENAMED: text_ttf_loading > text_font_filters
Diffstat (limited to 'examples/text')
| -rw-r--r-- | examples/text/text_font_filters.c (renamed from examples/text/text_ttf_loading.c) | 13 | ||||
| -rw-r--r-- | examples/text/text_font_filters.png | bin | 0 -> 60197 bytes | |||
| -rw-r--r-- | examples/text/text_ttf_loading.png | bin | 54908 -> 0 bytes |
3 files changed, 9 insertions, 4 deletions
diff --git a/examples/text/text_ttf_loading.c b/examples/text/text_font_filters.c index b256bd1d..60b16a04 100644 --- a/examples/text/text_ttf_loading.c +++ b/examples/text/text_font_filters.c @@ -1,6 +1,10 @@ /******************************************************************************************* * -* raylib [text] example - TTF loading and usage +* raylib [text] example - Font filters +* +* After font loading, font texture atlas filter could be configured for a softer +* display of the font when scaling it to different sizes, that way, it's not required +* to generate multiple fonts at multiple sizes (as long as the scaling is not very different) * * This example has been created using raylib 1.3.0 (www.raylib.com) * raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) @@ -18,9 +22,9 @@ int main(void) const int screenWidth = 800; const int screenHeight = 450; - InitWindow(screenWidth, screenHeight, "raylib [text] example - ttf loading"); + InitWindow(screenWidth, screenHeight, "raylib [text] example - font filters"); - const char msg[50] = "TTF Font"; + const char msg[50] = "Loaded Font"; // NOTE: Textures/Fonts MUST be loaded after Window initialization (OpenGL context is required) @@ -78,7 +82,8 @@ int main(void) int count = 0; char **droppedFiles = GetDroppedFiles(&count); - if (count == 1) // Only support one ttf file dropped + // NOTE: We only support first ttf file dropped + if (IsFileExtension(droppedFiles[0], ".ttf")) { UnloadFont(font); font = LoadFontEx(droppedFiles[0], fontSize, 0, 0); diff --git a/examples/text/text_font_filters.png b/examples/text/text_font_filters.png Binary files differnew file mode 100644 index 00000000..7ad823fb --- /dev/null +++ b/examples/text/text_font_filters.png diff --git a/examples/text/text_ttf_loading.png b/examples/text/text_ttf_loading.png Binary files differdeleted file mode 100644 index 5fdbda19..00000000 --- a/examples/text/text_ttf_loading.png +++ /dev/null |
