diff --git a/QuestPDF/Fluent/TextSpanDescriptorExtensions.cs b/QuestPDF/Fluent/TextSpanDescriptorExtensions.cs index 23cda24..522e90d 100644 --- a/QuestPDF/Fluent/TextSpanDescriptorExtensions.cs +++ b/QuestPDF/Fluent/TextSpanDescriptorExtensions.cs @@ -55,7 +55,13 @@ namespace QuestPDF.Fluent descriptor.MutateTextStyle(x => x.LineHeight(value)); return descriptor; } - + + public static T LetterSpacing(this T descriptor, float value) where T : TextSpanDescriptor + { + descriptor.MutateTextStyle(x => x.LetterSpacing(value)); + return descriptor; + } + public static T Italic(this T descriptor, bool value = true) where T : TextSpanDescriptor { descriptor.MutateTextStyle(x => x.Italic(value)); diff --git a/QuestPDF/Fluent/TextStyleExtensions.cs b/QuestPDF/Fluent/TextStyleExtensions.cs index 6119f6d..77b967c 100644 --- a/QuestPDF/Fluent/TextStyleExtensions.cs +++ b/QuestPDF/Fluent/TextStyleExtensions.cs @@ -48,7 +48,12 @@ namespace QuestPDF.Fluent { return style.Mutate(TextStyleProperty.LineHeight, value); } - + + public static TextStyle LetterSpacing(this TextStyle style, float value) + { + return style.Mutate(TextStyleProperty.LetterSpacing, value); + } + public static TextStyle Italic(this TextStyle style, bool value = true) { return style.Mutate(TextStyleProperty.IsItalic, value); diff --git a/QuestPDF/Infrastructure/TextStyle.cs b/QuestPDF/Infrastructure/TextStyle.cs index 6f498ad..8385876 100644 --- a/QuestPDF/Infrastructure/TextStyle.cs +++ b/QuestPDF/Infrastructure/TextStyle.cs @@ -10,6 +10,7 @@ namespace QuestPDF.Infrastructure internal string? FontFamily { get; set; } internal float? Size { get; set; } internal float? LineHeight { get; set; } + internal float? LetterSpacing { get; set; } internal FontWeight? FontWeight { get; set; } internal FontPosition? FontPosition { get; set; } internal bool? IsItalic { get; set; } @@ -26,6 +27,7 @@ namespace QuestPDF.Infrastructure FontFamily = Fonts.Lato, Size = 12, LineHeight = 1.2f, + LetterSpacing = 0, FontWeight = Infrastructure.FontWeight.Normal, FontPosition = Infrastructure.FontPosition.Normal, IsItalic = false,