diff options
| author | Ray <[email protected]> | 2018-09-06 16:56:21 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2018-09-06 16:56:21 +0200 |
| commit | dfb8837c466ea89ccdfa27b9c92700128d826353 (patch) | |
| tree | 28f64fbc860a71ec4cabff8d8975bae4c1d72bea /src/raylib.h | |
| parent | 1fcb3c0317e694a72ed4b6ed6601839cbf674809 (diff) | |
| download | raylib-dfb8837c466ea89ccdfa27b9c92700128d826353.tar.gz raylib-dfb8837c466ea89ccdfa27b9c92700128d826353.zip | |
Support aliased font texture generation
Useful for bitmaps pixelated fonts where anti-aliasing is not desired!
Change also enables additional font generation mechanisms in a future (cleartype, hinting...).
Diffstat (limited to 'src/raylib.h')
| -rw-r--r-- | src/raylib.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/raylib.h b/src/raylib.h index 8af8ab4d..5be60836 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -721,6 +721,13 @@ typedef enum { WRAP_MIRROR } TextureWrapMode; +// Font type, defines generation method +typedef enum { + FONT_DEFAULT = 0, // Default font generation, anti-aliased + FONT_BITMAP, // Bitmap font generation, no anti-aliasing + FONT_SDF // SDF font generation, requires external shader +} FontType; + // Color blending modes (pre-defined) typedef enum { BLEND_ALPHA = 0, @@ -1056,7 +1063,7 @@ RLAPI void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle RLAPI Font GetFontDefault(void); // Get the default Font RLAPI Font LoadFont(const char *fileName); // Load font from file into GPU memory (VRAM) RLAPI Font LoadFontEx(const char *fileName, int fontSize, int charsCount, int *fontChars); // Load font from file with extended parameters -RLAPI CharInfo *LoadFontData(const char *fileName, int fontSize, int *fontChars, int charsCount, bool sdf); // Load font data for further use +RLAPI CharInfo *LoadFontData(const char *fileName, int fontSize, int *fontChars, int charsCount, int type); // Load font data for further use RLAPI Image GenImageFontAtlas(CharInfo *chars, int fontSize, int charsCount, int padding, int packMethod); // Generate image font atlas using chars info RLAPI void UnloadFont(Font font); // Unload Font from GPU memory (VRAM) |
