bolmin 33 Posted November 25, 2020 Share Posted November 25, 2020 (edited) Hi, I am currently looking for a way to change the font when drawing text. I know there is a library for that in the downloads section on this site, but in doesn't work for some reason. I was looking for a native or something like HUD::SET_TEXT_FONT but there is nothing like that, so I am curious how to do it with natives. Edited November 26, 2020 by bolmin Quote Link to comment Share on other sites More sharing options...
iJamesss 2 Posted November 27, 2020 Share Posted November 27, 2020 (edited) void drawstring(std::string string, float X, float Y) { std::string Template = "<FONT FACE='$title' COLOR='#%04X'>" + string + "</FONT>"; const char* InsertTemplate= MISC::_CREATE_VAR_STRING(10, "LITERAL_STRING", _strdup(Template.c_str())); HUD::_DISPLAY_TEXT(MISC::_CREATE_VAR_STRING(42, "COLOR_STRING", 0, InsertTemplate), X, Y); } this is how you draw text with font, just change the $title to any other font names, can be found using open iv Edited November 27, 2020 by iJamesss 1 1 Quote Link to comment Share on other sites More sharing options...
bolmin 33 Posted November 27, 2020 Author Share Posted November 27, 2020 Thank you so much! I was looking for exactly something like this! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.