When I try to use fonts all of ImGui disappears. #4826
hapgood-brian
started this conversation in
Build/Link/Run/Fonts issues ONLY!
Replies: 1 comment 1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First of all, awesome library. I'm hoping you can help me if you get the time, I'm sure you're swamped. Or not, ImGui is just that good. I think I've set up everything correctly, but when I enable the code path that tries to use my TTFs I get nothing. Nothing draws at all. I found one magic bullet, calling
io.Fonts->Build()
because before that the runtime just crashed. Another topic. I easily got past that.The return result for
AddFontFromFileTTF
is a valid pointer. Again, no crashes when IPushFont
andPopFont
. Just nothing draws.I'm just keying off
g_pRobotoReg14
because I only want it to ever be done once. In my code this is placed in the screen initializer and that's re-entrant.So I'm figure that looks good. I couldn't find anywhere any documentation on
config.MergeMode
without digging into the code. So I'm not sure if it MUST be true when using more than one font. In your example in the FONTS page there was no storing of the return value fromAddFontFromFileTTF
so I was confused. What do I push inPushFont
?Next piece of code: where I'm using the font.
I only set the position and bounds once so I can actually move the window. Seemed like the right thing to do.
This is probably not the place to ask the following question but... How do I change all fonts everywhere? I like having the power of changing fonts surgically but I'd love to change them all in one place. That's an aside btw.
Thank you for your time,
Today is my first day using ImGUI and it's been pretty straightforward.
Brian.
Beta Was this translation helpful? Give feedback.
All reactions