mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-10-15 19:54:52 +08:00
use default width if present
if no widths array entry exists for the character and no font program is present for a true type simple font then use the 0 index glyph width if present in the widths array.
This commit is contained in:
@@ -148,6 +148,10 @@
|
|||||||
width = boundingBoxPreTransform;
|
width = boundingBoxPreTransform;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (widths?.Length > 0)
|
||||||
|
{
|
||||||
|
width = widths[0];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new InvalidOperationException($"Could not retrieve width for character code: {characterCode} in font {Name}.");
|
throw new InvalidOperationException($"Could not retrieve width for character code: {characterCode} in font {Name}.");
|
||||||
|
Reference in New Issue
Block a user