diff --git a/QuestPDF.Examples/QuestPDF.Examples.csproj b/QuestPDF.Examples/QuestPDF.Examples.csproj
index 33c0812..1750ad7 100644
--- a/QuestPDF.Examples/QuestPDF.Examples.csproj
+++ b/QuestPDF.Examples/QuestPDF.Examples.csproj
@@ -11,7 +11,7 @@
-
+
diff --git a/QuestPDF.Examples/TextExamples.cs b/QuestPDF.Examples/TextExamples.cs
index c562b10..77c7b14 100644
--- a/QuestPDF.Examples/TextExamples.cs
+++ b/QuestPDF.Examples/TextExamples.cs
@@ -567,5 +567,55 @@ namespace QuestPDF.Examples
});
});
}
+
+ [Test]
+ public void TextShaping_Unicode()
+ {
+ RenderingTest
+ .Create()
+ .PageSize(600, 100)
+
+ .ProduceImages()
+ .ShowResults()
+ .Render(container =>
+ {
+ container
+ .Padding(35)
+ .MinimalBox()
+ .Background(Colors.Grey.Lighten2)
+ .Text(text =>
+ {
+ text.DefaultTextStyle(TextStyle.Default.FontSize(20));
+
+ text.Span("Complex Unicode structure: ");
+
+
+ text.Span("T̶̖̔͆͆̽̔ḩ̷̼̫̐̈́̀͜͝͝ì̶͇̤͓̱̣͇͓͉̎s̵̡̟̹͍̜͉̗̾͛̈̐́͋͂͝͠ͅ ̴̨͙͍͇̭̒͗̀́͝ì̷̡̺͉̼̏̏̉̌͝s̷͍͙̗̰̖͙̈̑̂̔͑͊̌̓̊̇͜ ̶̛̼͚͊̅͘ṭ̷̨̘̣̙̖͉͌̏̂̅͑̄̽̕͝ȅ̶̲̲̙̭͈̬̣͔̝͔̈́͝s̸̢̯̪̫͓̭̮̓̀͆͜ț̸̢͉̞̥̤̏̌̓͝").FontColor(Colors.Red.Medium);
+
+
+ text.Span(".");
+ });
+ });
+ }
+
+ [Test]
+ public void TextShaping_Arabic()
+ {
+ RenderingTest
+ .Create()
+ .PageSize(500, 100)
+
+ .ProduceImages()
+ .ShowResults()
+ .Render(container =>
+ {
+ container
+ .Padding(25)
+ .MinimalBox()
+ .Background(Colors.Grey.Lighten2)
+ .Text("ينا الألم. في بعض الأحيان ونظراً للالتزامات التي يفرضها علينا")
+ .FontSize(20);
+ });
+ }
}
}
\ No newline at end of file
diff --git a/QuestPDF.Examples/TextShapingTests.cs b/QuestPDF.Examples/TextShapingTests.cs
deleted file mode 100644
index 90fa8a8..0000000
--- a/QuestPDF.Examples/TextShapingTests.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-using NUnit.Framework;
-using QuestPDF.Examples.Engine;
-using QuestPDF.Fluent;
-using SkiaSharp;
-using SkiaSharp.HarfBuzz;
-
-namespace QuestPDF.Examples
-{
- public class TextShapingTests
- {
- // [Test]
- // public void ShapeText()
- // {
- // using var textPaint = new SKPaint
- // {
- // Color = SKColors.Black,
- // Typeface = SKTypeface.CreateDefault(),
- // IsAntialias = true,
- // TextSize = 20
- // };
- //
- // using var backgroundPaint = new SKPaint
- // {
- // Color = SKColors.LightGray
- // };
- //
- // RenderingTest
- // .Create()
- // .PageSize(550, 250)
- // .ProduceImages()
- // .ShowResults()
- // .Render(container =>
- // {
- // //var lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec odio ipsum, aliquam a neque a, lacinia vehicula lectus.";
- // //var arabic = "ينا الألم. في بعض الأحيان ونظراً للالتزامات التي يفرضها علينا الواجب والعمل سنتنازل غالباً ونرفض الشعور";
- //
- // var lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit.";
- // var arabic = "ينا الألم. في بعض الأحيان ونظراً للالتزامات التي يفرضها علينا";
- //
- // var text = arabic;
- // var metrics = textPaint.FontMetrics;
- //
- // container
- // .Padding(25)
- // .Canvas((canvas, space) =>
- // {
- // canvas.Translate(0, 20);
- //
- // var width = MeasureText(text, textPaint);
- // var widthReal = textPaint.MeasureText(text);
- // canvas.DrawRect(0, metrics.Descent, width, metrics.Ascent - metrics.Descent, backgroundPaint);
- //
- // canvas.DrawShapedText(text, 0, 0, textPaint);
- //
- // canvas.Translate(0, 40);
- // canvas.DrawText(text, 0, 0, textPaint);
- // });
- // });
- // }
-
- [Test]
- public void MeasureTest()
- {
- using var textPaint = new SKPaint
- {
- Color = SKColors.Black,
- Typeface = SKTypeface.CreateDefault(),
- IsAntialias = true,
- TextSize = 20
- };
-
- var lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec odio ipsum, aliquam a neque a, lacinia vehicula lectus.";
- var arabic = "ينا الألم. في بعض الأحيان ونظراً للالتزامات التي يفرضها علينا";
- // 012345678901234567890123456789012345678901234567890123456
- var shaper = new SKShaper(textPaint.Typeface);
- var result = shaper.Shape(lorem, textPaint);
- }
- }
-}
\ No newline at end of file
diff --git a/QuestPDF.Previewer/QuestPDF.Previewer.csproj b/QuestPDF.Previewer/QuestPDF.Previewer.csproj
index 9ada0f5..671327f 100644
--- a/QuestPDF.Previewer/QuestPDF.Previewer.csproj
+++ b/QuestPDF.Previewer/QuestPDF.Previewer.csproj
@@ -48,7 +48,8 @@
+
-
+
diff --git a/QuestPDF.ReportSample/QuestPDF.ReportSample.csproj b/QuestPDF.ReportSample/QuestPDF.ReportSample.csproj
index d515e73..8f73098 100644
--- a/QuestPDF.ReportSample/QuestPDF.ReportSample.csproj
+++ b/QuestPDF.ReportSample/QuestPDF.ReportSample.csproj
@@ -12,7 +12,7 @@
-
+
diff --git a/QuestPDF.UnitTests/QuestPDF.UnitTests.csproj b/QuestPDF.UnitTests/QuestPDF.UnitTests.csproj
index a2f71d7..eb290d0 100644
--- a/QuestPDF.UnitTests/QuestPDF.UnitTests.csproj
+++ b/QuestPDF.UnitTests/QuestPDF.UnitTests.csproj
@@ -10,7 +10,7 @@
-
+
diff --git a/QuestPDF/QuestPDF.csproj b/QuestPDF/QuestPDF.csproj
index 9f3c0cf..ab3e2b7 100644
--- a/QuestPDF/QuestPDF.csproj
+++ b/QuestPDF/QuestPDF.csproj
@@ -3,7 +3,7 @@
MarcinZiabek
CodeFlint
QuestPDF
- 2022.6.0-prerelease
+ 2022.6.0
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.
$([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/Resources/ReleaseNotes.txt"))
9
@@ -23,8 +23,8 @@
-
-
+
+
diff --git a/QuestPDF/Resources/ReleaseNotes.txt b/QuestPDF/Resources/ReleaseNotes.txt
index 0679b9f..99f4f1d 100644
--- a/QuestPDF/Resources/ReleaseNotes.txt
+++ b/QuestPDF/Resources/ReleaseNotes.txt
@@ -1,4 +1,9 @@
-Implemented support for the text shaping algorithm that fixes rendering more advanced languages such as Arabic.
-Improved exception message when SkiaSharp throws the TypeInitializationException (when additional dependencies are needed).
-Fixed: a rare case when the Row.AutoItem does not calculate properly the width of its content.
+Integrated the text-shaping algorithm. This change significantly improves the Unicode compatibility. Also, it extends support for more advanced languages (e.g. Arabic) that:
+1) Combine multiple text characters and display them as a single visual glyph.
+2) Are displayed in the right-to-left order.
+
+Improved the exception message when SkiaSharp throws the TypeInitializationException. On some operating systems, SkiaSharp requires additional dependencies installed as nuget packages. This change should help developers determine how to choose and install them correctly.
+
+Fixed: a rare case when the Row.AutoItem() does not correctly calculate the width of its content.
+
Fixed: the QuestPDF Previewer does not work with content-rich documents.
diff --git a/readme.md b/readme.md
index 707d6e8..f5c32a4 100644
--- a/readme.md
+++ b/readme.md
@@ -59,7 +59,7 @@ Install-Package QuestPDF
dotnet add package QuestPDF
// Package reference in .csproj file
-
+
```
[](https://www.nuget.org/packages/QuestPDF/)