mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-10-14 19:05:01 +08:00
prevent negative point size for fonts
This commit is contained in:
@@ -161,6 +161,11 @@
|
||||
// see: https://stackoverflow.com/questions/48010235/pdf-specification-get-font-size-in-points
|
||||
var pointSize = Math.Round(rotation.Rotate(transformationMatrix).Multiply(TextMatrices.TextMatrix).Multiply(fontSize).A, 2);
|
||||
|
||||
if (pointSize < 0)
|
||||
{
|
||||
pointSize *= -1;
|
||||
}
|
||||
|
||||
while (bytes.MoveNext())
|
||||
{
|
||||
var code = font.ReadCharacterCode(bytes, out int codeLength);
|
||||
|
Reference in New Issue
Block a user