Search code examples
c#wpfunicodefontsfallback

What font is used if a Unicode-character is not found in the selected font (Tahoma)?


I have written a WPF user control that uses Tahoma as a font to display unicode strings, which works fine. However, I have noticed that some eastern asian characters are actually missing in Tahoma, i.e. this font does not support all common Unicode characters.

However, when I display a string that contains some east asian letters, that I suppose are missing in Tahoma.ttf, the character is displayed correctly anyway, instead of a black rectangle that I expected to get for the missing unicode character.

So out of curiosity: is there any fallback mechanism, i.e. does Windows 7 or C# WPF replace the missing characters from a fallback font? Can anybody please explain how exactly this is working, and which font is actually used as a allback?


Solution

  • See the Font Fallback section of the FontFamily reference.