Skip to content

Commit

Permalink
2023.12.4
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcinZiabek committed Jan 15, 2024
1 parent f8f6983 commit feac393
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
5 changes: 1 addition & 4 deletions Source/QuestPDF/Fluent/TextSpanDescriptorExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,8 @@ public static T LineHeight<T>(this T descriptor, float factor) where T : TextSpa
}

/// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.letterSpacing"]/*' />
public static T LetterSpacing<T>(this T descriptor, float factor) where T : TextSpanDescriptor
public static T LetterSpacing<T>(this T descriptor, float factor = 0) where T : TextSpanDescriptor
{
if (factor <= 0)
throw new ArgumentException("Letter spacing must be greater than 0.");

descriptor.MutateTextStyle(TextStyleExtensions.LetterSpacing, factor);
return descriptor;
}
Expand Down
5 changes: 1 addition & 4 deletions Source/QuestPDF/Fluent/TextStyleExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,8 @@ public static TextStyle LineHeight(this TextStyle style, float factor = 1)
}

/// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.letterSpacing"]/*' />
public static TextStyle LetterSpacing(this TextStyle style, float factor = 1)
public static TextStyle LetterSpacing(this TextStyle style, float factor = 0)
{
if (factor <= 0)
throw new ArgumentException("Letter spacing must be greater than 0.");

return style.Mutate(TextStyleProperty.LetterSpacing, factor);
}

Expand Down
2 changes: 1 addition & 1 deletion Source/QuestPDF/QuestPDF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Authors>MarcinZiabek</Authors>
<Company>CodeFlint</Company>
<PackageId>QuestPDF</PackageId>
<Version>2023.12.3</Version>
<Version>2023.12.4</Version>
<PackageDescription>QuestPDF is an open-source, modern and battle-tested library that can help you with generating PDF documents by offering friendly, discoverable and predictable C# fluent API. Easily generate PDF reports, invoices, exports, etc.</PackageDescription>
<PackageReleaseNotes>$([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/Resources/ReleaseNotes.txt"))</PackageReleaseNotes>
<LangVersion>10</LangVersion>
Expand Down
5 changes: 2 additions & 3 deletions Source/QuestPDF/Resources/Documentation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,13 @@
<doc for="text.letterSpacing">
<summary>
Adjusts the horizontal spacing between characters in the text.
The adjustment is proportional to the text size, where a <paramref name="factor"/> value of 1 maintains the original spacing.
The adjustment is proportional to the text size.
<a href="https://www.questpdf.com/api-reference/text.html#letter-spacing">Learn more</a>
</summary>

<param name="factor">
<para>Sets the proportion by which the horizontal space between characters is changed.</para>
<para>A factor greater than 1 spreads characters further apart, while a factor less than 1 (but more than 0) brings them closer together.</para>
<para>Must be greater than 0.</para>
<para>A value of 0 maintains the original spacing. When the value is positive, the text is more spread out. When it is negative, the text is more condensed.</para>
</param>
</doc>

Expand Down
3 changes: 3 additions & 0 deletions Source/QuestPDF/Resources/ReleaseNotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ Version 2023.12.3
- Improvement: enhanced the automated layout issue detection algorithm to cover a broader range of cases.
- Update: upgraded the SkiaSharp dependency to version 2.88.7. This update addresses issues with JPEG images being incorrectly encoded/decoded on ARM devices.
- Maintenance: added .NET 8 as an official build target for the library.

Version 2023.12.4
- Fixed: the TextStyle.LetterSpacing property was not documented correctly, and the FluentAPI code prevented its correct use.

0 comments on commit feac393

Please sign in to comment.