Ver código fonte

Improvement: updated the CreateNotMatchingFontException text to mention that glyph checking operation can be disabled with the Settings.CheckIfAllTextGlyphsAreAvailable setting

MarcinZiabek 2 anos atrás
pai
commit
ef89be9710
1 arquivos alterados com 3 adições e 1 exclusões
  1. 3 1
      Source/QuestPDF/Elements/Text/FontFallback.cs

+ 3 - 1
Source/QuestPDF/Elements/Text/FontFallback.cs

@@ -105,7 +105,9 @@ namespace QuestPDF.Elements.Text
                     $"Font families available on current environment that contain this glyph: {proposedFontsFormatted}. " +
                     $"Possible solutions: " +
                     $"1) Use one of the listed fonts as the primary font in your document. " +
-                    $"2) Configure the fallback TextStyle using the 'TextStyle.Fallback' method with one of the listed fonts. ");
+                    $"2) Configure the fallback TextStyle using the 'TextStyle.Fallback' method with one of the listed fonts. " +
+                    $"You can disable this check by setting the 'Settings.CheckIfAllTextGlyphsAreAvailable' option to 'false'. " +
+                    $"However, this may result with text glyphs being incorrectly rendered without any warning.");
             }
             
             static IEnumerable<string> FindFontsContainingGlyph(int codepoint)