Custom font not showing in lepoard


   I've got a plugin using a custom font. Everything is fine under snow leopard and windows, but under leopard the font isn't showing up correctly.

Any Idea ?


What do you mean by “custom font”? An embedded juce font, or a system font that you’ve installed?


  A font that i've serialized.

…ok, well serialised fonts are rendered completely in software, so it should make no difference which OS you’re using. If you can get me some code that I could use to reproduce it, I’ll take a look, but it sounds a bit strange!

Quite simple …

Font loading ( in constructor )
mEurostileTTypeFace = new CustomTypeface(mis);
mEurostileTFont = new Font(mEurostileTTypeFace);

Paint function
//font slection
#ifdef JUCE_MAC
// text Display
g.drawText(“some text to draw”)[/code]

Well yes, but I don’t have your typeface to try!

Hi Jules,

    My serialized fnt Binary files is about 6.5 M.... i should have done someting wrong. I tried to serialize the font with FSerialize ( a tool, that may be not uptodate, found in this Forum ). The generated Font is lot smaller ( about 1M ) but works only on windows.. It's driving me mad.
    In short what is the best way to serialize a font ?

    Could be a Tools included with Juce ? I could do that if you give me the green ligth.



It’d be a good tool to include in the Introjucer, but the tricky part is that OSX doesn’t provide enough info about the glyphs in a font to be able to automatically add all of them to a serialised font, so it would probably only work in Windows. (Unless you had a UI to actually select which glyphs should be added to the serialised font).

Hi Jules,

I’m working with drolland, maybe I can give you more information about this problem.

Our aim is to use a font (EurostileT) in a plugin where both plain and bold versions are to be displayed. So far, we used the bold flag to pass the font to bold version when needed, and go back to plain for other texts.

As the EurostileT file (containing the fonts) does not include a bold version (that is in a separated file), can that be the problem encountered by the serialisation process? Or does the bolding system occur at rendering level?


known bug with fallback font not working on OSX AFAIK

Each custom font has flags to say whether it’s bold, italic, etc, but there’s no way for the system to know that one custom font is a bold version of another one - you’d need to manually select the bold or plain typefaces when you want to use them.

Ok, I will then serialise two fonts:
[list][] One coming from “EurostileTBold.ttf”, with the bold flag set[/]
[] One coming from “EurostileT.ttf” with the bold flag cleared[/][/list]