Skip to content

Commit 8fe9277

Browse files
authored
Merge pull request #185 from bensuperpc/update_font
Add font functions to Functions.cpp
2 parents 8945c6d + ca9ed76 commit 8fe9277

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

include/Functions.hpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,20 @@ RLCPPAPI inline void DrawTextPro(const Font& font, const std::string& text, Vect
273273
::DrawTextPro(font, text.c_str(), position, origin, rotation, fontSize, spacing, tint);
274274
}
275275

276+
/**
277+
* Load font from file (filename must include file extension)
278+
*/
279+
RLCPPAPI inline ::Font LoadFont(const std::string& fileName) {
280+
return ::LoadFont(fileName.c_str());
281+
}
282+
283+
/**
284+
* Load font from file (filename must include file extension)
285+
*/
286+
RLCPPAPI inline ::Font LoadFontEx(const std::string& fileName, int fontSize, int *fontChars, int charsCount) {
287+
return ::LoadFontEx(fileName.c_str(), fontSize, fontChars, charsCount);
288+
}
289+
276290
/**
277291
* Measure string width for default font
278292
*/

0 commit comments

Comments
 (0)