mirror of
https://github.com/UglyToad/PdfPig.git
synced 2026-03-10 00:23:29 +08:00
handle missing embedded cid font for type 0 fonts
all font file entries in the font descriptor for type 0 fonts are optional. if the font is missing we default to returning the default bounding box.
This commit is contained in:
@@ -90,6 +90,11 @@
|
||||
{
|
||||
throw new ArgumentException($"The provided character identifier was negative: {characterIdentifier}.");
|
||||
}
|
||||
|
||||
if (fontProgram == null)
|
||||
{
|
||||
return Descriptor?.BoundingBox ?? new PdfRectangle(0, 0, 1000, 0);
|
||||
}
|
||||
|
||||
if (fontProgram.TryGetBoundingBox(characterIdentifier, out var boundingBox))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user