Jump to content

Changing draw_text font


bolmin
 Share

Recommended Posts

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 by bolmin
Link to comment
Share on other sites

       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 by iJamesss
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...