rename Font into RLFont

prevent conflict with Xlib.h
This commit is contained in:
SergeyMC9730 2024-03-07 22:51:20 +08:00
commit 19cd976000
3 changed files with 327 additions and 329 deletions

View file

@ -194,12 +194,12 @@ ImageMipmaps|void|(Image *image);|
ImageDither|void|(Image *image, int rBpp, int gBpp, int bBpp, int aBpp);|
ImageExtractPalette|Color *|(Image image, int maxPaletteSize, int *extractCount);|
ImageText|Image|(const char *text, int fontSize, Color color);|
ImageTextEx|Image|(Font font, const char *text, float fontSize, float spacing, Color tint);|
ImageTextEx|Image|(RLFont font, const char *text, float fontSize, float spacing, Color tint);|
ImageDraw|void|(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec);|
ImageDrawRectangle|void|(Image *dst, Rectangle rec, Color color);|
ImageDrawRectangleLines|void|(Image *dst, Rectangle rec, int thick, Color color);|
ImageDrawText|void|(Image *dst, Vector2 position, const char *text, int fontSize, Color color);|
ImageDrawTextEx|void|(Image *dst, Vector2 position, Font font, const char *text, float fontSize, float spacing, Color color);|
ImageDrawTextEx|void|(Image *dst, Vector2 position, RLFont font, const char *text, float fontSize, float spacing, Color color);|
ImageFlipVertical|void|(Image *image);|
ImageFlipHorizontal|void|(Image *image);|
ImageRotate|void|(Image *image, int degrees);|
@ -229,21 +229,21 @@ DrawTextureRec|void|(Texture2D texture, Rectangle sourceRec, Vector2 position, C
DrawTextureQuad|void|(Texture2D texture, Vector2 tiling, Vector2 offset, Rectangle quad, Color tint);|
DrawTexturePro|void|(Texture2D texture, Rectangle sourceRec, Rectangle destRec, Vector2 origin, float rotation, Color tint);|
DrawTextureNPatch|void|(Texture2D texture, NPatchInfo nPatchInfo, Rectangle destRec, Vector2 origin, float rotation, Color tint);|
GetFontDefault|Font|(void);|
LoadFont|Font|(const char *fileName);|
LoadFontEx|Font|(const char *fileName, int fontSize, int *fontChars, int charsCount);|
LoadFontFromImage|Font|(Image image, Color key, int firstChar);|
GetFontDefault|RLFont|(void);|
LoadFont|RLFont|(const char *fileName);|
LoadFontEx|RLFont|(const char *fileName, int fontSize, int *fontChars, int charsCount);|
LoadFontFromImage|RLFont|(Image image, Color key, int firstChar);|
LoadFontData|CharInfo *|(const char *fileName, int fontSize, int *fontChars, int charsCount, int type);|
GenImageFontAtlas|Image|(CharInfo *chars, int charsCount, int fontSize, int padding, int packMethod);|
UnloadFont|void|(Font font);|
UnloadFont|void|(RLFont font);|
DrawFPS|void|(int posX, int posY);|
DrawText|void|(const char *text, int posX, int posY, int fontSize, Color color);|
DrawTextEx|void|(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint);|
DrawTextRec|void|(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint);|
DrawTextRecEx|void|(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectText, Color selectBack);|
DrawTextEx|void|(RLFont font, const char *text, Vector2 position, float fontSize, float spacing, Color tint);|
DrawTextRec|void|(RLFont font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint);|
DrawTextRecEx|void|(RLFont font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectText, Color selectBack);|
MeasureText|int|(const char *text, int fontSize);|
MeasureTextEx|Vector2|(Font font, const char *text, float fontSize, float spacing);|
GetGlyphIndex|int|(Font font, int character);|
MeasureTextEx|Vector2|(RLFont font, const char *text, float fontSize, float spacing);|
GetGlyphIndex|int|(RLFont font, int character);|
TextIsEqual|bool|(const char *text1, const char *text2);|
TextLength|unsigned int|(const char *text);|
TextFormat|const char *|(const char *text, ...);|
@ -406,7 +406,7 @@ Texture|struct||
RenderTexture|struct||
NPatchInfo|struct||
CharInfo|struct||
Font|struct||
RLFont|struct||
Camera|struct||
Camera2D|struct||
Mesh|struct||

View file

@ -1670,7 +1670,7 @@
</KeyWord>
<KeyWord name="ImageTextEx" func="yes">
<Overload retVal="Image" descr="Create an image from text (custom sprite font)">
<Param name="Font font" />
<Param name="RLFont font" />
<Param name="const char *text" />
<Param name="float fontSize" />
<Param name="float spacing" />
@ -1990,7 +1990,7 @@
<KeyWord name="ImageDrawTextEx" func="yes">
<Overload retVal="void" descr="Draw text (custom sprite font) within an image (destination)">
<Param name="Image *dst" />
<Param name="Font font" />
<Param name="RLFont font" />
<Param name="const char *text" />
<Param name="Vector2 position" />
<Param name="float fontSize" />
@ -2215,20 +2215,20 @@
</KeyWord>
<!-------------------------------------------------------------------------------------- -->
<!-- Font Loading and Text Drawing Functions (Module: text) -->
<!-- RLFont Loading and Text Drawing Functions (Module: text) -->
<!-------------------------------------------------------------------------------------- -->
<!-- Font loading/unloading functions -->
<!-- RLFont loading/unloading functions -->
<KeyWord name="GetFontDefault" func="yes">
<Overload retVal="Font" descr="Get the default Font"></Overload>
<Overload retVal="RLFont" descr="Get the default RLFont"></Overload>
</KeyWord>
<KeyWord name="LoadFont" func="yes">
<Overload retVal="Font" descr="Load font from file into GPU memory (VRAM)">
<Overload retVal="RLFont" descr="Load font from file into GPU memory (VRAM)">
<Param name="const char *fileName" />
</Overload>
</KeyWord>
<KeyWord name="LoadFontEx" func="yes">
<Overload retVal="Font" descr="Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set">
<Overload retVal="RLFont" descr="Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set">
<Param name="const char *fileName" />
<Param name="int fontSize" />
<Param name="int *codepoints" />
@ -2236,14 +2236,14 @@
</Overload>
</KeyWord>
<KeyWord name="LoadFontFromImage" func="yes">
<Overload retVal="Font" descr="Load font from Image (XNA style)">
<Overload retVal="RLFont" descr="Load font from Image (XNA style)">
<Param name="Image image" />
<Param name="Color key" />
<Param name="int firstChar" />
</Overload>
</KeyWord>
<KeyWord name="LoadFontFromMemory" func="yes">
<Overload retVal="Font" descr="Load font from memory buffer, fileType refers to extension: i.e. '.ttf'">
<Overload retVal="RLFont" descr="Load font from memory buffer, fileType refers to extension: i.e. '.ttf'">
<Param name="const char *fileType" />
<Param name="const unsigned char" />
<Param name="int dataSize" />
@ -2254,7 +2254,7 @@
</KeyWord>
<KeyWord name="IsFontReady" func="yes">
<Overload retVal="bool" descr="Check if a font is ready">
<Param name="Font font" />
<Param name="RLFont font" />
</Overload>
</KeyWord>
<KeyWord name="LoadFontData" func="yes">
@ -2285,12 +2285,12 @@
</KeyWord>
<KeyWord name="UnloadFont" func="yes">
<Overload retVal="void" descr="Unload font from GPU memory (VRAM)">
<Param name="Font font" />
<Param name="RLFont font" />
</Overload>
</KeyWord>
<KeyWord name="ExportFontAsCode" func="yes">
<Overload retVal="bool" descr="Export font as code file, returns true on success">
<Param name="Font font" />
<Param name="RLFont font" />
<Param name="const char *fileName" />
</Overload>
</KeyWord>
@ -2313,7 +2313,7 @@
</KeyWord>
<KeyWord name="DrawTextEx" func="yes">
<Overload retVal="void" descr="Draw text using font and additional parameters">
<Param name="Font font" />
<Param name="RLFont font" />
<Param name="const char *text" />
<Param name="Vector2 position" />
<Param name="float fontSize" />
@ -2322,8 +2322,8 @@
</Overload>
</KeyWord>
<KeyWord name="DrawTextPro" func="yes">
<Overload retVal="void" descr="Draw text using Font and pro parameters (rotation)">
<Param name="Font font" />
<Overload retVal="void" descr="Draw text using RLFont and pro parameters (rotation)">
<Param name="RLFont font" />
<Param name="const char *text" />
<Param name="Vector2 position" />
<Param name="Vector2 origin" />
@ -2335,7 +2335,7 @@
</KeyWord>
<KeyWord name="DrawTextCodepoint" func="yes">
<Overload retVal="void" descr="Draw one character (codepoint)">
<Param name="Font font" />
<Param name="RLFont font" />
<Param name="int codepoint" />
<Param name="Vector2 position" />
<Param name="float fontSize" />
@ -2344,7 +2344,7 @@
</KeyWord>
<KeyWord name="DrawTextCodepoints" func="yes">
<Overload retVal="void" descr="Draw multiple character (codepoint)">
<Param name="Font font" />
<Param name="RLFont font" />
<Param name="const int *codepoints" />
<Param name="int codepointCount" />
<Param name="Vector2 position" />
@ -2367,8 +2367,8 @@
</Overload>
</KeyWord>
<KeyWord name="MeasureTextEx" func="yes">
<Overload retVal="Vector2" descr="Measure string size for Font">
<Param name="Font font" />
<Overload retVal="Vector2" descr="Measure string size for RLFont">
<Param name="RLFont font" />
<Param name="const char *text" />
<Param name="float fontSize" />
<Param name="float spacing" />
@ -2376,19 +2376,19 @@
</KeyWord>
<KeyWord name="GetGlyphIndex" func="yes">
<Overload retVal="int" descr="Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found">
<Param name="Font font" />
<Param name="RLFont font" />
<Param name="int codepoint" />
</Overload>
</KeyWord>
<KeyWord name="GetGlyphInfo" func="yes">
<Overload retVal="GlyphInfo" descr="Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found">
<Param name="Font font" />
<Param name="RLFont font" />
<Param name="int codepoint" />
</Overload>
</KeyWord>
<KeyWord name="GetGlyphAtlasRec" func="yes">
<Overload retVal="Rectangle" descr="Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found">
<Param name="Font font" />
<Param name="RLFont font" />
<Param name="int codepoint" />
</Overload>
</KeyWord>
@ -2822,7 +2822,7 @@
<Param name="Vector2 size" />
<Param name="Vector2 origin" />
<Param name="float rotation" />
<Param name="0ó¿8± " />
<Param name="0<EFBFBD>8<EFBFBD> " />
</Overload>
</KeyWord>
@ -3452,5 +3452,3 @@
<Param name="AudioCallback processor" />
</Overload>
</KeyWord>

View file

@ -366,7 +366,7 @@ RLAPI Image GenImageText(int width, int height, const char *text);
RLAPI Image ImageCopy(Image image); // Create an image duplicate (useful for transformations)
RLAPI Image ImageFromImage(Image image, Rectangle rec); // Create an image from another image piece
RLAPI Image ImageText(const char *text, int fontSize, Color color); // Create an image from text (default font)
RLAPI Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint); // Create an image from text (custom sprite font)
RLAPI Image ImageTextEx(RLFont font, const char *text, float fontSize, float spacing, Color tint); // Create an image from text (custom sprite font)
RLAPI void ImageFormat(Image *image, int newFormat); // Convert image data to desired format
RLAPI void ImageToPOT(Image *image, Color fill); // Convert image to POT (power-of-two)
RLAPI void ImageCrop(Image *image, Rectangle crop); // Crop an image to a defined rectangle
@ -416,7 +416,7 @@ RLAPI void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color);
RLAPI void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image
RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source)
RLAPI void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) within an image (destination)
RLAPI void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text (custom sprite font) within an image (destination)
RLAPI void ImageDrawTextEx(Image *dst, RLFont font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text (custom sprite font) within an image (destination)
// Texture loading functions
// NOTE: These functions require GPU access
@ -462,37 +462,37 @@ RLAPI void SetPixelColor(void *dstPtr, Color color, int format); // S
RLAPI int GetPixelDataSize(int width, int height, int format); // Get pixel data size in bytes for certain format
//------------------------------------------------------------------------------------
// Font Loading and Text Drawing Functions (Module: text)
// RLFont Loading and Text Drawing Functions (Module: text)
//------------------------------------------------------------------------------------
// 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 *codepoints, int codepointCount); // Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set
RLAPI Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style)
RLAPI Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
RLAPI bool IsFontReady(Font font); // Check if a font is ready
// RLFont loading/unloading functions
RLAPI RLFont GetFontDefault(void); // Get the default RLFont
RLAPI RLFont LoadFont(const char *fileName); // Load font from file into GPU memory (VRAM)
RLAPI RLFont LoadFontEx(const char *fileName, int fontSize, int *codepoints, int codepointCount); // Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set
RLAPI RLFont LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style)
RLAPI RLFont LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
RLAPI bool IsFontReady(RLFont font); // Check if a font is ready
RLAPI GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount, int type); // Load font data for further use
RLAPI Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
RLAPI void UnloadFontData(GlyphInfo *glyphs, int glyphCount); // Unload font chars info data (RAM)
RLAPI void UnloadFont(Font font); // Unload font from GPU memory (VRAM)
RLAPI bool ExportFontAsCode(Font font, const char *fileName); // Export font as code file, returns true on success
RLAPI void UnloadFont(RLFont font); // Unload font from GPU memory (VRAM)
RLAPI bool ExportFontAsCode(RLFont font, const char *fileName); // Export font as code file, returns true on success
// Text drawing functions
RLAPI void DrawFPS(int posX, int posY); // Draw current FPS
RLAPI void DrawText(const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font)
RLAPI void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text using font and additional parameters
RLAPI void DrawTextPro(Font font, const char *text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint); // Draw text using Font and pro parameters (rotation)
RLAPI void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSize, Color tint); // Draw one character (codepoint)
RLAPI void DrawTextCodepoints(Font font, const int *codepoints, int codepointCount, Vector2 position, float fontSize, float spacing, Color tint); // Draw multiple character (codepoint)
RLAPI void DrawTextEx(RLFont font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text using font and additional parameters
RLAPI void DrawTextPro(RLFont font, const char *text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint); // Draw text using RLFont and pro parameters (rotation)
RLAPI void DrawTextCodepoint(RLFont font, int codepoint, Vector2 position, float fontSize, Color tint); // Draw one character (codepoint)
RLAPI void DrawTextCodepoints(RLFont font, const int *codepoints, int codepointCount, Vector2 position, float fontSize, float spacing, Color tint); // Draw multiple character (codepoint)
// Text font info functions
RLAPI void SetTextLineSpacing(int spacing); // Set vertical line spacing when drawing with line-breaks
RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font
RLAPI Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing); // Measure string size for Font
RLAPI int GetGlyphIndex(Font font, int codepoint); // Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found
RLAPI GlyphInfo GetGlyphInfo(Font font, int codepoint); // Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found
RLAPI Rectangle GetGlyphAtlasRec(Font font, int codepoint); // Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found
RLAPI Vector2 MeasureTextEx(RLFont font, const char *text, float fontSize, float spacing); // Measure string size for RLFont
RLAPI int GetGlyphIndex(RLFont font, int codepoint); // Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found
RLAPI GlyphInfo GetGlyphInfo(RLFont font, int codepoint); // Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found
RLAPI Rectangle GetGlyphAtlasRec(RLFont font, int codepoint); // Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found
// Text codepoints management functions (unicode characters)
RLAPI char *LoadUTF8(const int *codepoints, int length); // Load UTF-8 text encoded from codepoints array