Code refactorization + added support for multi typeface font types

This commit is contained in:
MarcinZiabek
2022-02-25 23:02:42 +01:00
parent 8a64abaac2
commit 8db283d559
3 changed files with 89 additions and 58 deletions
+3 -3
View File
@@ -13,11 +13,11 @@ namespace QuestPDF.Examples
[Test]
public void Example()
{
FontManager.RegisterFontType("LibreBarcode39", File.OpenRead("LibreBarcode39-Regular.ttf"));
FontManager.RegisterFontType(File.OpenRead("LibreBarcode39-Regular.ttf"));
RenderingTest
.Create()
.PageSize(400, 100)
.PageSize(400, 200)
.ShowResults()
.Render(container =>
{
@@ -25,7 +25,7 @@ namespace QuestPDF.Examples
.Background(Colors.White)
.AlignCenter()
.AlignMiddle()
.Text("*QuestPDF*", TextStyle.Default.FontType("LibreBarcode39").Size(64));
.Text("*QuestPDF*", TextStyle.Default.FontType("Libre Barcode 39").Size(64));
});
}
}