Update font functions

Update font functions

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
Bensuperpc
2022-05-16 00:02:26 +02:00
parent 8945c6d8a7
commit 73f61668d5

View File

@@ -273,6 +273,31 @@ RLCPPAPI inline void DrawTextPro(const Font& font, const std::string& text, Vect
::DrawTextPro(font, text.c_str(), position, origin, rotation, fontSize, spacing, tint);
}
/**
* Get default font
*/
RLCPPAPI inline ::Font GetFontDefault() {
return ::GetFontDefault();
}
/**
* Load font from file (filename must include file extension)
*/
RLCPPAPI inline ::Font LoadFont(const std::string& fileName) {
return ::LoadFont(fileName.c_str());
}
RLCPPAPI inline ::Font LoadFontFromImage(const Image& image, ::Color key, int firstChar) {
return ::LoadFontFromImage(image, key, firstChar);
}
/**
* Load font from file (filename must include file extension)
*/
RLCPPAPI inline ::Font LoadFontEx(const std::string& fileName, int fontSize, int *fontChars, int charsCount) {
return ::LoadFontEx(fileName.c_str(), fontSize, fontChars, charsCount);
}
/**
* Measure string width for default font
*/