title: UWP and .NetCore - Inconsistent Font Family Names
body: <p>I'm using UWP for a front end GUI and a full trust background process written in .NetCore 3.1 for some heavy lifting tasks. However, I'm having an odd issue when it comes to pulling back all the installed fonts as the list returned is not consistent between the two frameworks.</p>
  <p>In UWP the following code (based on the answer to <a href="https://stackoverflow.com/questions/33575969/list-installed-font-names-in-windows-10-universal-app">this SO question</a>) is used to populate a dropdown list and returns approximately 241 font families:</p>
  <pre><code>public List&lt;string&gt; FontFamilies
  {
      get
      {
          return CanvasTextFormat.GetSystemFontFamilies(ApplicationLanguages.Languages).OrderBy(x =&gt; x).ToList();
      }
  }
  </code></pre>
  <p>The selected fontfamily is then passed as a string to the .NetCore background process which attempts to get the font. However, <code>var fonts = System.Drawing.Text.InstalledFontCollection()</code> returns a very different list (477 elements) to the UWP function. Many of these additional items seem to be because the variations on the font families (e.g. regular, bold and italic) are not being collapsed into a single family. But in some cases the name is different; for example an OpenType font <code>Playlist Script</code> in UWP becomes <code>Playlist</code> in NetCore.</p>
  <p>I've tried to seeing if the language IDs has something to do with the disparity but without success and wondered if anyone else has had to deal with a similar issue?</p>