Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h2>Generate a lookup table for Silverlight:</h2> <p>WPF has the properties to do this, but Silverlight does not. </p> <p>If you look at the System.Windows.Media.Typeface objects in the debugger the fonts do not contain anything except 2 version numbers and the FontUri (read filename).</p> <p>You could generate a lookup dictionary by running code under WPF to extract all the filenames and matching fontnames, but you need to do that on a machine with every font installed that you want to cover.</p> <p>The WPF code below extracts such a table (this one contains the font names in all languages, so you will probably want to add a filter to it e.g. by "en-us"):</p> <pre><code> foreach (var font in System.Windows.Media.Fonts.SystemTypefaces) { System.Windows.Media.GlyphTypeface glyphTypeface; font.TryGetGlyphTypeface(out glyphTypeface); var dictionary = font.FaceNames; foreach (var language in dictionary.Keys) { Debug.WriteLine(string.Format("\"{0}\", \"{1}\", \"{2}\"", glyphTypeface.FontUri.Segments[glyphTypeface.FontUri.Segments.Count()-1], language, dictionary[language])); } } </code></pre> <p>Part of the output is shown below and could be easily formatted into a table or loaded as a dictionary in Silverlight:</p> <pre><code>"ARIAL.TTF", "ca-es", "Normal" "ARIAL.TTF", "cs-cz", "obyčejné" "ARIAL.TTF", "da-dk", "normal" "ARIAL.TTF", "de-de", "Standard" "ARIAL.TTF", "el-gr", "Κανονικά" "ARIAL.TTF", "en-us", "Regular" "ARIAL.TTF", "es-es", "Normal" "ARIAL.TTF", "es-mx", "Normal" "ARIAL.TTF", "eu-es", "Arrunta" "ARIAL.TTF", "fi-fi", "Normaali" "ARIAL.TTF", "fr-ca", "Normal" "ARIAL.TTF", "fr-fr", "Normal" "ARIAL.TTF", "hu-hu", "Normál" "ARIAL.TTF", "it-it", "Normale" "ARIAL.TTF", "nb-no", "Normal" "ARIAL.TTF", "nl-nl", "Standaard" "ARIAL.TTF", "pl-pl", "Normalny" "ARIAL.TTF", "pt-br", "Normal" "ARIAL.TTF", "pt-pt", "Normal" "ARIAL.TTF", "ru-ru", "Обычный" "ARIAL.TTF", "sk-sk", "Normálne" "ARIAL.TTF", "sl-si", "Navadno" "ARIAL.TTF", "sv-se", "Normal" "ARIAL.TTF", "tr-tr", "Normal" "ARIAL.TTF", "vi-vn", "thường" "ARIALN.TTF", "en-us", "Narrow" "ARIALI.TTF", "ca-es", "Cursiva" "ARIALI.TTF", "cs-cz", "kurzíva" "ARIALI.TTF", "da-dk", "kursiv" "ARIALI.TTF", "de-de", "Kursiv" "ARIALI.TTF", "el-gr", "Πλάγια" "ARIALI.TTF", "en-us", "Italic" "ARIALI.TTF", "es-es", "Cursiva" "ARIALI.TTF", "es-mx", "Cursiva" "ARIALI.TTF", "eu-es", "Etzana" "ARIALI.TTF", "fi-fi", "Kursivoitu" "ARIALI.TTF", "fr-ca", "Italique" "ARIALI.TTF", "fr-fr", "Italique" "ARIALI.TTF", "hu-hu", "Dőlt" "ARIALI.TTF", "it-it", "Corsivo" "ARIALI.TTF", "nb-no", "Kursiv" "ARIALI.TTF", "nl-nl", "Cursief" "ARIALI.TTF", "pl-pl", "Kursywa" "ARIALI.TTF", "pt-br", "Itálico" "ARIALI.TTF", "pt-pt", "Itálico" "ARIALI.TTF", "ru-ru", "Курсив" "ARIALI.TTF", "sk-sk", "Kurzíva" "ARIALI.TTF", "sl-si", "Poševno" "ARIALI.TTF", "sv-se", "Kursiv" "ARIALI.TTF", "tr-tr", "İtalik" "ARIALI.TTF", "vi-vn", "nghiêng" "ARIALNI.TTF", "en-us", "Narrow" "ARIALBD.TTF", "ca-es", "Negreta" "ARIALBD.TTF", "cs-cz", "tučné" "ARIALBD.TTF", "da-dk", "fed" "ARIALBD.TTF", "de-de", "Fett" "ARIALBD.TTF", "el-gr", "Έντονα" "ARIALBD.TTF", "en-us", "Bold" "ARIALBD.TTF", "es-es", "Negrita" "ARIALBD.TTF", "es-mx", "Negrita" "ARIALBD.TTF", "eu-es", "Lodia" "ARIALBD.TTF", "fi-fi", "Lihavoitu" </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload