Browse Source

Fixed: when text contains injected block items, hyperlinks' positions are calculated incorrectly

Marcin Ziąbek 1 year ago
parent
commit
0bde64ddf0

+ 2 - 0
Source/QuestPDF/Elements/Text/TextBlock.cs

@@ -320,6 +320,8 @@ namespace QuestPDF.Elements.Text
                             Baseline = SkPlaceholderStyle.PlaceholderBaseline.Alphabetic,
                             BaselineOffset = 0
                         });
+
+                        currentTextIndex++;
                     }
                 }
 

+ 2 - 1
Source/QuestPDF/Resources/ReleaseNotes.txt

@@ -27,5 +27,6 @@ We would like to thank the SkiaSharp project, its maintainers, and contributors,
 
 Version 2024.3.1
 - Enhanced discoverability of text alignment options (AlignLeft, AlignCenter, AlignRight, AlignStart, AlignEnd and Justify) when using the shorthand Text method (common use case).
+- To enhance compatibility with existing codebases, we've removed the breaking change associated with the deprecation of the TextStyle.Fallback method. Although this method remains obsolete, we've reintroduced it with a compatibility layer to prevent disruptions.
 - Fix: on the Windows platform, the "Could not find an appropriate font fallback for the following glyphs: $U-000D" exception is thrown when the "QuestPDF.Settings.CheckIfAllTextGlyphsAreAvailable" is set true, and the "TextDescriptor.Line" method is used (that inserts the '\r' character).
-- Improvement: To enhance compatibility with existing codebases, we've removed the breaking change associated with the deprecation of the TextStyle.Fallback method. Although this method remains obsolete, we've reintroduced it with a compatibility layer to prevent disruptions.
+- Fix: resolved an issue where the positioning of hyperlinks was incorrect when text contained injected block items.