Browse Source

fix glyph check in FontFallback.MatchFallbackOption

Alexander V 2 years ago
parent
commit
6096771b51
1 changed files with 6 additions and 1 deletions
  1. 6 1
      Source/QuestPDF/Elements/Text/FontFallback.cs

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

@@ -86,7 +86,12 @@ namespace QuestPDF.Elements.Text
                         return fallbackOption;
                 }
 
-                throw CreateNotMatchingFontException(codepoint);
+                if (Settings.CheckIfAllTextGlyphsAreAvailable)
+                {
+                    throw CreateNotMatchingFontException(codepoint);
+                }
+
+                return fallbackOptions.First();
             }
 
             static Exception CreateNotMatchingFontException(int codepoint)