Japanese text display


Hi Guys,

I’m trying to display some Japanese text and I have some trouble.
It works fine on mac though. (specifying a japanese font like Hiragino Kaku Gothic Pro W6)

I would like to know if there are some special stuff to do on Windows to make it work ?



Should work ok if your system has a japanese font installed… I know that people are using juce for apps that handle japanese, so it’s certainly possible!


Japanese fonts are installed ( I try to make it work in other app just before)
and it display fine in Visual C++, firefox…

Juce is compiled with Unicode support.

When trying to display a Japanese char, I end up here in juce_Typeface.cpp

else if (character != defaultCharacter)
const Font fallbackFont (Font::getFallbackFontName(), 10, 0);
Typeface* const fallbackTypeface = fallbackFont.getTypeface();

    if (fallbackTypeface != 0 && fallbackTypeface != this)
        return fallbackTypeface->getGlyph (character);

    return getGlyph (defaultCharacter);

Font::getFallbackFontName() returns en empty string.
Don’t know if this looks good.
and at the end it ended up returning 0 as TypefaceGlyphInfo

Any idea ?


If I specify MS Mincho as fonts it now works fine on Windows.
So it looks like the real issue is the value that returns getFallbackFontName


Oh yes - sorry, I’d forgotten all about the setFallbackFontName() stuff. Yes, if you call that to set something sensible, it should work.


We use Font::setFallbackFontName(“MS UI Gothic”); on the PC and it works just fine but setFallbackFontName does not work on the Mac.

Does not work:

But this does work fine:

I have also tried with MS Arial Unicode but with the same reslt.

So it’s possible to set and display the Japanese glyphs on the Mac but not as a fallback font?


+1 for fallback font not working on the mac(using tip) and Listbox


Ok, I’ll investigate…




^ yes, what he said :wink:


Just a note that the setFallbackFont is working on the Mac now with revision 689