From 6096771b51d26866ea43597c2fff95484d4d4862 Mon Sep 17 00:00:00 2001 From: Alexander V Date: Thu, 23 Feb 2023 23:09:30 +0300 Subject: [PATCH] fix glyph check in FontFallback.MatchFallbackOption --- Source/QuestPDF/Elements/Text/FontFallback.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/QuestPDF/Elements/Text/FontFallback.cs b/Source/QuestPDF/Elements/Text/FontFallback.cs index 69bf6e2..c7aefd3 100644 --- a/Source/QuestPDF/Elements/Text/FontFallback.cs +++ b/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)