Set Type 3 font ascent to Top instead of Height, see #1164
Some checks failed
Build, test and publish draft / build (push) Has been cancelled
Build and test [MacOS] / build (push) Has been cancelled
Run Common Crawl Tests / build (0000-0001) (push) Has been cancelled
Run Common Crawl Tests / build (0002-0003) (push) Has been cancelled
Run Common Crawl Tests / build (0004-0005) (push) Has been cancelled
Run Common Crawl Tests / build (0006-0007) (push) Has been cancelled
Run Integration Tests / build (push) Has been cancelled
Nightly Release / Check if this commit has already been published (push) Has been cancelled
Nightly Release / tests (push) Has been cancelled
Nightly Release / build_and_publish_nightly (push) Has been cancelled

This commit is contained in:
BobLd
2025-10-14 11:58:15 +01:00
parent 2216ade1f2
commit 255e70f0a7
4 changed files with 13 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

View File

@@ -147,6 +147,13 @@
Run(Type3FontZeroHeight, 1255);
}
[Fact]
public void test_a()
{
// Rendered glyphs are not correct, but we use the grid to assess
Run("test_a", 1584, 1);
}
private static void Run(string file, int imageHeight = 792, int pageNo = 1)
{
var pdfFileName = GetFilename(file);
@@ -246,7 +253,11 @@
pdf = pdf.Replace(".pdf", ".jpg");
return SKImage.FromEncodedData(pdf);
if (File.Exists(pdf))
{
return SKImage.FromEncodedData(pdf);
}
return SKImage.FromEncodedData(pdf.Replace(".jpg", ".png"));
}
}
}

View File

@@ -58,7 +58,7 @@
private double ComputeAscent()
{
return fontMatrix.TransformY(boundingBox.Height);
return fontMatrix.TransformY(boundingBox.Top);
}
public int ReadCharacterCode(IInputBytes bytes, out int codeLength)