Fallback font not working


#1

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.


#2

…yes… I hit some very tricky problems with implementing the fallback font now that it uses native methods to render the glyphs. I’ll go back and figure something out eventually…


#3

Is this fixed?


#4

No, sorry - haven’t looked at it yet.


#5

Bump !

Unless I’m mistaken this do not work in Juce tip.
At least on OSX.

Thanks,


#6

No, it’s quite a tricky thing to do, I’ve not looked at it yet…


#7

I didn’t find this function in 1.53 anymore. So I assume we have a new way for fallback font?