Browse Source

Fixed: when a Text element contains multiple paragraphs, a null-reference exception is thrown for the TextStyle.FontFeatures property

Marcin Ziąbek 1 year ago
parent
commit
0419d968c2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Source/QuestPDF/Infrastructure/TextStyle.cs

+ 2 - 2
Source/QuestPDF/Infrastructure/TextStyle.cs

@@ -45,8 +45,8 @@ namespace QuestPDF.Infrastructure
             Color = Colors.Black,
             Color = Colors.Black,
             BackgroundColor = Colors.Transparent,
             BackgroundColor = Colors.Transparent,
             DecorationColor = Colors.Black,
             DecorationColor = Colors.Black,
-            FontFamilies = new[] { Fonts.Lato },
-            FontFeatures = {},
+            FontFamilies = [ Fonts.Lato ],
+            FontFeatures = [],
             Size = 12,
             Size = 12,
             LineHeight = NormalLineHeightCalculatedFromFontMetrics,
             LineHeight = NormalLineHeightCalculatedFromFontMetrics,
             LetterSpacing = 0,
             LetterSpacing = 0,