diff --git a/examples/textures/textures_image_text.c b/examples/textures/textures_image_text.c index fb99e8277..ce91fbf26 100644 --- a/examples/textures/textures_image_text.c +++ b/examples/textures/textures_image_text.c @@ -21,7 +21,7 @@ int main() InitWindow(screenWidth, screenHeight, "raylib [texture] example - image text drawing"); // TTF Font loading with custom generation parameters - Font font = LoadFontEx("resources/KAISG.ttf", 64, 95, 0); + Font font = LoadFontEx("resources/KAISG.ttf", 64, 0, 0); Image parrots = LoadImage("resources/parrots.png"); // Load image in CPU memory (RAM) diff --git a/games/transmission/screens/screen_ending.c b/games/transmission/screens/screen_ending.c index 620fc30b4..bb355b8b0 100644 --- a/games/transmission/screens/screen_ending.c +++ b/games/transmission/screens/screen_ending.c @@ -123,7 +123,7 @@ void InitEndingScreen(void) // Generate newspaper with title and subtitle Image imNewspaper = LoadImage("resources/textures/ending_newspaper.png"); - fontNews = LoadFontEx("resources/fonts/Lora-Bold.ttf", 32, 250, 0); + fontNews = LoadFontEx("resources/fonts/Lora-Bold.ttf", 32, 0, 250); ImageDrawTextEx(&imNewspaper, (Vector2){ 50, 220 }, fontNews, headline, fontNews.baseSize, 0, DARKGRAY); texNewspaper = LoadTextureFromImage(imNewspaper); diff --git a/games/transmission/screens/screen_gameplay.c b/games/transmission/screens/screen_gameplay.c index aeec98ca1..814db8242 100644 --- a/games/transmission/screens/screen_gameplay.c +++ b/games/transmission/screens/screen_gameplay.c @@ -126,7 +126,7 @@ void InitGameplayScreen(void) framesCounter = 0; finishScreen = 0; - fontMessage = LoadFontEx("resources/fonts/traveling_typewriter.ttf", 30, 250, 0); + fontMessage = LoadFontEx("resources/fonts/traveling_typewriter.ttf", 30, 0, 250); texBackground = LoadTexture("resources/textures/message_background.png"); texVignette = LoadTexture("resources/textures/message_vignette.png"); diff --git a/src/raylib.h b/src/raylib.h index 023d35c79..d4b5bd20b 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1095,7 +1095,7 @@ RLAPI void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle // Font loading/unloading functions 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 Font LoadFontEx(const char *fileName, int fontSize, int *fontChars, int charsCount); // Load font from file with extended parameters RLAPI Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style) 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 charsCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info diff --git a/src/text.c b/src/text.c index 80b75f106..770c8ddb5 100644 --- a/src/text.c +++ b/src/text.c @@ -275,7 +275,7 @@ Font LoadFont(const char *fileName) Font font = { 0 }; #if defined(SUPPORT_FILEFORMAT_TTF) - if (IsFileExtension(fileName, ".ttf") || IsFileExtension(fileName, ".otf")) font = LoadFontEx(fileName, DEFAULT_TTF_FONTSIZE, DEFAULT_TTF_NUMCHARS, NULL); + if (IsFileExtension(fileName, ".ttf") || IsFileExtension(fileName, ".otf")) font = LoadFontEx(fileName, DEFAULT_TTF_FONTSIZE, NULL, DEFAULT_TTF_NUMCHARS); else #endif #if defined(SUPPORT_FILEFORMAT_FNT) @@ -301,7 +301,7 @@ Font LoadFont(const char *fileName) // Load Font from TTF font file with generation parameters // NOTE: You can pass an array with desired characters, those characters should be available in the font // if array is NULL, default char set is selected 32..126 -Font LoadFontEx(const char *fileName, int fontSize, int charsCount, int *fontChars) +Font LoadFontEx(const char *fileName, int fontSize, int *fontChars, int charsCount) { Font font = { 0 };