title: How do I set the fallback font for special characters in Pango strings on Windows?
body: <p>My application displays strings using <a href="https://www.pango.org/" rel="nofollow noreferrer">Pango</a>, Cairo and GTK3. Some of those strings include some special characters, including one not in the Unicode basic plane. On Linux this just worked, but on Windows it can't find the special characters and displays the unknown character box instead.</p>
  
  <p>I'm using Roboto for the text, but it doesn't include these characters. Using a trick I <a href="https://repolinux.wordpress.com/2013/03/10/find-out-fallback-font-used-by-fontconfig-for-a-certain-character/" rel="nofollow noreferrer">found here</a> I've discovered that on Linux the underlying <a href="https://www.freedesktop.org/software/fontconfig/fontconfig-user.html" rel="nofollow noreferrer">fontconfig</a> library fails over to <a href="https://www.ffonts.net/Symbolica.font" rel="nofollow noreferrer">Symbolica</a> or <a href="https://www.stixfonts.org/" rel="nofollow noreferrer">STIX</a>.</p>
  
  <blockquote>
    <p>FC_DEBUG=4 pango-view -q -t '{character}' 2>&amp;1 | grep -o 'family: "[^"]+' | cut -c 10- | tail -n 1</p>
  </blockquote>
  
  <p>I've tried installing those fonts on the Windows machine, but no joy.</p>
  
  <p>My Windows machine is running <a href="https://mingw-w64.org/doku.php" rel="nofollow noreferrer">Mingw-w64</a> which ships with <code>/etc/fonts</code> containing the fontconfig files, but they don't seem to be doing the right thing. Unfortunately <code>pango-view</code> doesn't seem to be paying attention to the FC_DEBUG environment variable there so I can't find out what it's doing.</p>
  
  <p>How can I tell fontconfig on Windows where to get glyphs for code points that Roboto doesn't provide?</p>
  
  <p><em>Update:</em> I've set <a href="https://developer.gnome.org/pygtk/stable/class-pangoattribute.html#function-pango--attrfallback" rel="nofollow noreferrer">AttrFallback</a> on the strings in question to be True, just in case the Pango builds were treating this differently on Linux and Windows. Still no luck.</p>