default to .notdef for type 2 charstrings

if the glyph with a specific name isn't found in the set of type 2 charstrings we default to using the .notdef glyph if present.
This commit is contained in:
Eliot Jones
2020-02-21 10:37:58 +00:00
parent c635b919d2
commit 28faf1c22c

View File

@@ -45,7 +45,10 @@
if (!CharStrings.TryGetValue(name, out var sequence))
{
throw new InvalidOperationException($"No charstring sequence with the name /{name} in this font.");
if (!CharStrings.TryGetValue(".notdef", out sequence))
{
throw new InvalidOperationException($"No charstring sequence with the name /{name} in this font.");
}
}
try