From 73f61668d5a04ac3620db682925ef71287ddada0 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Mon, 16 May 2022 00:02:26 +0200 Subject: [PATCH] Update font functions Update font functions Signed-off-by: Bensuperpc --- include/Functions.hpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/include/Functions.hpp b/include/Functions.hpp index 63ae37b..9466a77 100644 --- a/include/Functions.hpp +++ b/include/Functions.hpp @@ -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 */