diff options
| author | Murray Campbell <[email protected]> | 2018-09-21 18:09:53 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-09-21 18:09:53 -0500 |
| commit | c015529088e62b26c8419a1e1ed026ec959d24a7 (patch) | |
| tree | 96806f05ec37bd5c5e6a93ffcf7120d1c663f982 /examples/text | |
| parent | f97bb085bf71bbaa7aed223e9243029979ba4948 (diff) | |
| parent | 9efe5c6802b25f0e773b659f87153f309b8af8e2 (diff) | |
| download | raylib-c015529088e62b26c8419a1e1ed026ec959d24a7.tar.gz raylib-c015529088e62b26c8419a1e1ed026ec959d24a7.zip | |
Merge pull request #5 from raysan5/master
merge
Diffstat (limited to 'examples/text')
| -rw-r--r-- | examples/text/text_font_sdf.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/text/text_font_sdf.c b/examples/text/text_font_sdf.c index c23a1e2e..755b642d 100644 --- a/examples/text/text_font_sdf.c +++ b/examples/text/text_font_sdf.c @@ -29,19 +29,18 @@ int main() fontDefault.baseSize = 16; fontDefault.charsCount = 95; // Parameters > font size: 16, no chars array provided (0), chars count: 95 (autogenerate chars array) - fontDefault.chars = LoadFontData("resources/AnonymousPro-Bold.ttf", 16, 0, 95, false); + fontDefault.chars = LoadFontData("resources/AnonymousPro-Bold.ttf", 16, 0, 95, FONT_DEFAULT); // Parameters > chars count: 95, font size: 16, chars padding in image: 4 px, pack method: 0 (default) Image atlas = GenImageFontAtlas(fontDefault.chars, 95, 16, 4, 0); fontDefault.texture = LoadTextureFromImage(atlas); UnloadImage(atlas); // SDF font generation from TTF font - // NOTE: SDF chars data is generated with LoadFontData(), it's just a bool option Font fontSDF = { 0 }; fontSDF.baseSize = 16; fontSDF.charsCount = 95; // Parameters > font size: 16, no chars array provided (0), chars count: 0 (defaults to 95) - fontSDF.chars = LoadFontData("resources/AnonymousPro-Bold.ttf", 16, 0, 0, true); + fontSDF.chars = LoadFontData("resources/AnonymousPro-Bold.ttf", 16, 0, 0, FONT_SDF); // Parameters > chars count: 95, font size: 16, chars padding in image: 0 px, pack method: 1 (Skyline algorythm) atlas = GenImageFontAtlas(fontSDF.chars, 95, 16, 0, 1); fontSDF.texture = LoadTextureFromImage(atlas); |
