From 09a85d04971afd594d0707b160ae88c031726bf4 Mon Sep 17 00:00:00 2001 From: Eliot Jones Date: Sun, 22 Nov 2020 12:49:47 -0400 Subject: [PATCH] treat arial mt as standard 14 font #236 --- .../Standard14Fonts/Standard14.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/UglyToad.PdfPig.Fonts/Standard14Fonts/Standard14.cs b/src/UglyToad.PdfPig.Fonts/Standard14Fonts/Standard14.cs index f30f3f31..68f7cf18 100644 --- a/src/UglyToad.PdfPig.Fonts/Standard14Fonts/Standard14.cs +++ b/src/UglyToad.PdfPig.Fonts/Standard14Fonts/Standard14.cs @@ -76,6 +76,12 @@ AddAdobeFontMetrics("Times,Italic", "Times-Italic"); AddAdobeFontMetrics("Times,Bold", "Times-Bold"); AddAdobeFontMetrics("Times,BoldItalic", "Times-BoldItalic"); + + // Additional names for Arial + AddAdobeFontMetrics("ArialMT", "Helvetica"); + AddAdobeFontMetrics("Arial-ItalicMT", "Helvetica-Oblique"); + AddAdobeFontMetrics("Arial-BoldMT", "Helvetica-Bold"); + AddAdobeFontMetrics("Arial-BoldItalicMT", "Helvetica-BoldOblique"); } private static void AddAdobeFontMetrics(string fontName, Standard14Font? type = null) @@ -143,7 +149,7 @@ { return Standard14Cache[BuilderTypesToNames[fontType]]; } - + /// /// Determines if a font with this name is a standard 14 font. /// @@ -159,7 +165,7 @@ { return new HashSet(Standard14Names); } - + /// /// Get the official Standard 14 name of the actual font which the given font name maps to. ///