Font Use

Hi there

I have been having issues recently with loading fonts - I tried to load in a .ttf from the internet, and noticed there was no change in the font. I tried converting this to an egg file and loading that in, and although it works in pview, it does not change the visual representation of the font.

I am using the following code section to load the font. Please excuse the use of Wingdings, I was trying to get something visually distinct.

m_tfScoreFont = FontPool::load_font("/e/Project/models/WINGDNG2.TTF");

The font doesn’t throw up any errors to say it has failed to load, and I can still use the font (Although it appears to have some form of default font it loads, as I can still render text). As a result, I am not sure what I am doing wrong. I have tried specifying FontPool::load_font(“WINGDNG2.TTF”), and several other variations but have had no luck.

Is there anything I am missing?

Mostly, I’m confused by your report. It sounds like you’re saying you’re loading a font successfully, but you’re not seeing any change to your onscreen text.

I assume you’re assigning the font to the TextNode you’re using to display text? Otherwise, of course, the TextNode will continue to use whatever font it had before, which is presumably the default font.


Yep - completely missed that call. Thanks for your help though :slight_smile:

I had migrated a bunch of debug text over from a previous file and must have missed a section when I did so. I did wonder why it was only working for some of my text nodes :blush: