title: COM exception when applying a font in a WPF app
body: <p>We have a text editor with a dropdown font list. The list is, like Word, styled with the fonts themselves.</p>
  
  <p>We have found that at least one font makes the editor crash. The font is Niconne Regular, and can be downloaded from Google Web Fonts: <a href="http://www.google.com/fonts/" rel="nofollow">http://www.google.com/fonts/</a> : search Niconne, click "add to collection", and click the top right arrow button "download". Then, copy the font to your Windows\Fonts folder.</p>
  
  <p>I have been able to create a simple project that reproduces the bug here : <a href="https://github.com/tbroust-trepia/wpf-font-crash" rel="nofollow">https://github.com/tbroust-trepia/wpf-font-crash</a></p>
  
  <p>Here is the simplified code:</p>
  
  <pre><code>&lt;ComboBox Name="DropFontName"&gt;
    &lt;ComboBox.ItemTemplate&gt;
        &lt;DataTemplate&gt;
            &lt;Viewbox&gt;
                &lt;TextBlock Name="TextFontName" 
                  Text="{Binding Path=Source, Converter={local:FontNameFormatConvertor}}" 
                  FontFamily="{Binding}" /&gt;
            &lt;/Viewbox&gt;
        &lt;/DataTemplate&gt;
    &lt;/ComboBox.ItemTemplate&gt;
  &lt;/ComboBox&gt;
  </code></pre>
  
  <p>The ItemsSource of DropFontName is bound in the view code, and the source is an <code>ObservableCollection&lt;FontFamily&gt;</code>.</p>
  
  <p>Each time I open the DropFontName to select a font, it crashes (so, basically, whenever .Net tries to apply the font to an element).<br>
  If I remove the font that causes problems from my fonts, it works. If I remove the FontFamily binding, it works when I open the dropdown, but it crashes when I apply the font.</p>
  
  <p>The font works fine in any other non-WPF app (like Word for instance).</p>
  
  <p>The problem is, the crash is not catched, except by the main "catcher". The stacktrace only mentions internal errors. I thought I could catch this error and remove the problematic font on binding, but since I don't know how to catch it, I can't.</p>
  
  <p>Thanks !</p>