mirror of
https://github.com/UglyToad/PdfPig.git
synced 2026-03-10 00:23:29 +08:00
default to zero width characters in truetype for '.notdef'
when the character is not defined and the corresponding '.notdef' glyph isn't included in a truetype font we now default to a zero width character. it might be that we should use the default/missing width instead but this will work ok for most use-cases.
This commit is contained in:
@@ -87,7 +87,10 @@
|
||||
}
|
||||
|
||||
var name = encoding.GetName(characterCode);
|
||||
var metrics = fontMetrics.CharacterMetrics[name];
|
||||
if (!fontMetrics.CharacterMetrics.TryGetValue(name, out var metrics))
|
||||
{
|
||||
return new CharacterBoundingBox(new PdfRectangle(), 0);
|
||||
}
|
||||
|
||||
if (overrides?.TryGetWidth(characterCode, out width) != true)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user