vendor: import KillerPDF 1.7.5 source (GPL-3.0) as the base for MMD PDF

This commit is contained in:
2026-08-27 06:58:22 +02:00
commit 532485a830
577 changed files with 149058 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
using KillerPDF.Services;
using Xunit;
namespace KillerPDF.Tests
{
public class PdfFontStyleTests
{
[Theory]
// #187: families are normalized to the installed Windows family the PostScript name
// means - the raw PS name resolves to nothing in WPF and read as "all formatting lost".
[InlineData("ABCDEF+Helvetica-Bold", "Arial", true, false)]
[InlineData("Helvetica-Oblique", "Arial", false, true)]
[InlineData("TimesNewRomanPS-BoldItalicMT", "Times New Roman", true, true)]
[InlineData("Arial-Regular", "Arial", false, false)]
[InlineData("ArialMT", "Arial", false, false)]
[InlineData("TimesNewRomanPSMT", "Times New Roman", false, false)]
[InlineData("CourierNewPS-BoldMT", "Courier New", true, false)]
[InlineData("GHIJKL+BookAntiqua", "Book Antiqua", false, false)]
public void DetectsFaceStyleFromPdfFontName(string source, string family, bool bold, bool italic)
{
var detected = PdfFontStyle.FromPdfName(source);
Assert.Equal(family, detected.Family);
Assert.Equal(bold, detected.Bold);
Assert.Equal(italic, detected.Italic);
}
}
}