diff --git a/src/UglyToad.PdfPig.Tests/Integration/Documents/Single Page Simple - from inkscape.jpg b/src/UglyToad.PdfPig.Tests/Integration/Documents/Single Page Simple - from inkscape.jpg new file mode 100644 index 00000000..d20e4860 Binary files /dev/null and b/src/UglyToad.PdfPig.Tests/Integration/Documents/Single Page Simple - from inkscape.jpg differ diff --git a/src/UglyToad.PdfPig.Tests/Integration/Documents/Single Page Simple - from inkscape.pdf b/src/UglyToad.PdfPig.Tests/Integration/Documents/Single Page Simple - from inkscape.pdf new file mode 100644 index 00000000..7d6dea71 Binary files /dev/null and b/src/UglyToad.PdfPig.Tests/Integration/Documents/Single Page Simple - from inkscape.pdf differ diff --git a/src/UglyToad.PdfPig.Tests/Integration/VisualVerification/GenerateLetterBoundingBoxImages.cs b/src/UglyToad.PdfPig.Tests/Integration/VisualVerification/GenerateLetterBoundingBoxImages.cs index 3b245bfb..cd5d1dac 100644 --- a/src/UglyToad.PdfPig.Tests/Integration/VisualVerification/GenerateLetterBoundingBoxImages.cs +++ b/src/UglyToad.PdfPig.Tests/Integration/VisualVerification/GenerateLetterBoundingBoxImages.cs @@ -11,6 +11,7 @@ private const string SingleGoogleDrivePage = "Single Page Simple - from google drive"; private const string SinglePageFormattedType0Content = "Type0 Font"; private const string SinglePageType1Content = "ICML03-081"; + private const string SingleInkscapePage = "Single Page Simple - from inkscape"; private static string GetFilename(string name) { @@ -30,6 +31,12 @@ Run(SinglePageType1Content); } + [Fact] + public void SinglePageSimpleFromInkscape() + { + Run(SingleInkscapePage); + } + [Fact] public void SinglePageNonLatinFromAcrobatDistiller() { diff --git a/src/UglyToad.PdfPig/Fonts/Simple/TrueTypeSimpleFont.cs b/src/UglyToad.PdfPig/Fonts/Simple/TrueTypeSimpleFont.cs index 22a454b0..05d99288 100644 --- a/src/UglyToad.PdfPig/Fonts/Simple/TrueTypeSimpleFont.cs +++ b/src/UglyToad.PdfPig/Fonts/Simple/TrueTypeSimpleFont.cs @@ -110,7 +110,7 @@ if (font == null) { fromFont = false; - width = widths[characterCode]; + width = widths[characterCode - firstCharacter]; } else {