예제 #1
0
 /// <summary>
 /// Get all installed fonts in the system.
 /// <param name="checkForUpdates">If <c>true</c> the font collection is updated.</param>
 /// </summary>
 /// <param name="checkForUpdates">if set to <c>true</c> [check for updates].</param>
 /// <returns>IEnumerable&lt;System.String&gt;.</returns>
 public IEnumerable <string> GetInstalledFontFamilyNames(bool checkForUpdates = false)
 {
     if (allFonts == null || checkForUpdates)
     {
         var fontFamilyManager = GetFontFamilyManager();
         var fonts             = new List <string>();
         fonts.AddRange(fontFamilyManager.GetAllFontNames());
         if (!GetPlatformConfiguration().GetOptions().Fonts.UseInbuiltFontsOnly)
         {
             fonts.AddRange(fontManager.GetInstalledFontFamilyNames(checkForUpdates));
         }
         allFonts = fonts.Distinct().ToList();
     }
     return(allFonts);
 }
예제 #2
0
 public override IEnumerable <string> GetInstalledFontFamilyNames(bool checkForUpdates = false) =>
 _platformImpl.GetInstalledFontFamilyNames(checkForUpdates);