mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-09-21 04:17:57 +08:00
#9 add support for cff cid fonts, currently bounding box and width are calculated incorrectly.
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
var subType = dictionary.GetNameOrDefault(NameToken.Subtype);
|
||||
if (NameToken.CidFontType0.Equals(subType))
|
||||
{
|
||||
return new Type0CidFont(fontProgram, type, subType, baseFont, systemInfo, descriptor);
|
||||
return new Type0CidFont(fontProgram, type, subType, baseFont, systemInfo, descriptor, widths);
|
||||
}
|
||||
|
||||
if (NameToken.CidFontType2.Equals(subType))
|
||||
@@ -127,7 +127,7 @@
|
||||
{
|
||||
var bytes = str.Decode(filterProvider);
|
||||
var font = compactFontFormatParser.Parse(new CompactFontFormatData(bytes));
|
||||
throw new NotSupportedException($"Unsupported subtype for CID font {subtypeName}. Font: {font}");
|
||||
return font;
|
||||
}
|
||||
|
||||
if (subtypeName == NameToken.Type1C)
|
||||
|
Reference in New Issue
Block a user