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 ?
Thanks,
jules
December 16, 2008, 1:23pm
2
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
[code]
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);
}[/code]
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
jules
December 16, 2008, 2:26pm
5
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:
Font::setFallbackFontName(“Osaka”);
But this does work fine:
Font::setDefaultSansSerifFontName(“Osaka”);
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?
jaydee
January 26, 2009, 5:55pm
7
+1 for fallback font not working on the mac(using tip) and Listbox
jaydee
February 10, 2009, 8:19pm
11
Just a note that the setFallbackFont is working on the Mac now with revision 689