I am trying to display some mixed English and Chinese text. The string is in UTF8 and I set the fallbackfont to a chinese font. However, the chinese part still cannot be displayed (empty). Then I dig into CustomTypeface::GlyphInfo* CustomTypeface::findGlyphSubstituting (const juce_wchar character) throw()
And I found:
if (glyph == 0)
{
const Font fallbackFont (Font::getFallbackFontName(), 10, 0);
Typeface* const fallbackTypeface = fallbackFont.getTypeface();
if (fallbackTypeface != 0 && fallbackTypeface != this)
{
//xxx
}
if (glyph == 0)
glyph = findGlyph (defaultCharacter, true);
}
I think the //xxx part should be filled with something to return the glyph in fallback font.