How to make your custom fonts in ImGui.

xLamantine

Newbie
Newbie
Newbie
Newbie
Status
Offline
Joined
Mar 16, 2021
Messages
8
Reaction score
2
Welcome at my another thread! Here i will show you how to use custom ImGui fonts in your cheat. Let's start!
There are two types of ImGui fonts. I will show you all.
Type first. Importing fonts from PC directories. It's working like this:
1615883809921.png
All you need to do is add this function in your main code:
ImGuiIO& io = ImGui::GetIO(); io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\Code Pro.otf", 15);
Then you succesfully added your custom font. Next if really need it, you can add other fonts like this:
ImFont* Logo = io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\Code Pro Demo.otf", 24);
To use it in your menu you need to call PushFont function then PopFont Function.
ImGui::PushFont(Logo); Then ImGui::PopFont();
This method not good at all because your user needs to download your fonts to use your menu. Then you can import your fonts using byte's. Just do something like this:
Go to the
You cant view this link please login.

Import your file and copy your code. Then add this code in new include header file like this:
1615884198794.png
Include your header in main function and add code like this:
io.Fonts->AddFontFromMemoryTTF(&LogoFont, sizeof LogoFont, 15); ImFont* Logo = io.Fonts->AddFontFromMemoryTTF(&LogoFont, sizeof LogoFont, 18);
First argument of the function is your char name Example: LogoFont. Add & symbol. Second argument is function that can calculate your size of bytes. And last argument is font size. If you using the byte fonts your user dont needs to download your fonts, so it's very good.
If u have any question's you can ask me.
 
Top