mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-07-16 05:11:17 +08:00
#406 always use standard 14 width for advance if available for truetype with standard14 font type
This commit is contained in:
parent
5b66e4b846
commit
e2b7de54e9
@ -82,7 +82,15 @@
|
||||
|
||||
if (overrides?.TryGetWidth(characterCode, out width) != true)
|
||||
{
|
||||
width = bounds.Width;
|
||||
var encodedName = encoding.GetName(characterCode);
|
||||
if (fontMetrics.CharacterMetrics.TryGetValue(encodedName, out var fontMetricsForGlyph))
|
||||
{
|
||||
width = DefaultTransformation.TransformX(fontMetricsForGlyph.Width.X);
|
||||
}
|
||||
else
|
||||
{
|
||||
width = bounds.Width;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user