Example code for creating & using Custom Typeface?

Intellisense is not the most accurate measurement of correctness. Do you get an error when compiling? And, if so, what is that error?

Fair point. I got a Compiler Error C2061, “syntax error : identifier ‘[identifier name]’,” which is why I was hoping that maybe if I could get that mystery line, I could instantiate the proper Typeface::Ptr and possibly use that to make the MemoryInputStream?

Apologies if what I’m saying makes no sense, I am still learning the JUCE and C++ ropes.

I’m not sure which line you’re looking for, exactly, but the setTypefaceForFont implementation in @ttg-2’s last reply should contain what you need. Specifically the line:

tf = Typeface::createSystemTypefaceFor(BinaryData::FontFilename_ttf, BinaryData::FontFilename_ttfSize);

Is what actually creates the typeface.

I should have encouraged to also post the code which is producing the error. It gives more context, so people can try and help. :slight_smile:

I was referring to this post by @valhalladsp but I will take a closer look at the post from @ttg-2 to see if that approach works better and share my code if I still can’t get it to run.

I guess I was looking at a dated thread. The info on the Modern custom font guide? thread was able to point me in the right direction. Or at lest, a simpler solution.