mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-11-28 17:37:37 +08:00
#406 always use standard 14 width for advance if available for truetype with standard14 font type
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user