#406 always use standard 14 width for advance if available for truetype with standard14 font type

This commit is contained in:
Eliot Jones 2022-01-15 13:07:35 +00:00
parent 5b66e4b846
commit e2b7de54e9

View File

@ -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
{