# Fallback font not working

**URL:** <https://forum.juce.com/t/fallback-font-not-working/4797>\
**Category:** General JUCE discussion\
**Created:** [January 29, 2010, 8:10am UTC](https://forum.juce.com/t/fallback-font-not-working/4797 "2010-01-29T08:10:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![cxhawk](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@cxhawk](https://forum.juce.com/u/cxhawk)\
**Post date:** [January 29, 2010, 8:10am UTC](https://forum.juce.com/t/fallback-font-not-working/4797/1 "2010-01-29T08:10:39Z")

</div>

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:

```auto

        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.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [January 29, 2010, 9:28am UTC](https://forum.juce.com/t/fallback-font-not-working/4797/2 "2010-01-29T09:28:04Z")

</div>

…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…

---

<div class="post-metadata">

**Author:** ![cxhawk](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@cxhawk](https://forum.juce.com/u/cxhawk)\
**Post date:** [March 11, 2010, 8:20am UTC](https://forum.juce.com/t/fallback-font-not-working/4797/3 "2010-03-11T08:20:07Z")

</div>

Is this fixed?

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [March 11, 2010, 11:00am UTC](https://forum.juce.com/t/fallback-font-not-working/4797/4 "2010-03-11T11:00:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![otristan](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@otristan](https://forum.juce.com/u/otristan)\
**Post date:** [August 20, 2010, 9:10am UTC](https://forum.juce.com/t/fallback-font-not-working/4797/5 "2010-08-20T09:10:03Z")

</div>

Bump !

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

Thanks,

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [August 20, 2010, 11:29am UTC](https://forum.juce.com/t/fallback-font-not-working/4797/6 "2010-08-20T11:29:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cxhawk](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@cxhawk](https://forum.juce.com/u/cxhawk)\
**Post date:** [October 24, 2011, 11:56pm UTC](https://forum.juce.com/t/fallback-font-not-working/4797/7 "2011-10-24T23:56:19Z")

</div>

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