Files
mmd-pdf/MmdPdf.Tests/PdfFontStyleTests.cs
kua-agent 6610acfa44 feat: rebrand to MMD PDF, single corporate theme, and remove original text under an edit
- Services/PdfRedactText.cs: strip text whose origin falls inside a CoverAnnotation
  from the page content stream at save time, hooked into PdfBurn.DrawAnnotationsIntoDoc.
  Fixes edited values staying recoverable by text extraction.
- Themes/MMD.xaml replaces all thirteen themes; picker and accent strip removed; no dark mode.
- Rename KillerPDF -> MMD PDF across code, resources, packaging and locale strings; new icon.
- Remove the upstream author credit and the in-app install button.
2026-08-27 07:37:09 +02:00

29 lines
1.2 KiB
C#

using MmdPdf.Services;
using Xunit;
namespace MmdPdf.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);
}
}
}