mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-09-19 19:07:56 +08:00
add support for type1c cid fonts
This commit is contained in:
@@ -131,18 +131,15 @@
|
|||||||
throw new PdfDocumentFormatException($"The font file stream did not contain a subtype entry: {str.StreamDictionary}.");
|
throw new PdfDocumentFormatException($"The font file stream did not contain a subtype entry: {str.StreamDictionary}.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (subtypeName == NameToken.CidFontType0C)
|
if (subtypeName == NameToken.CidFontType0C
|
||||||
|
|| subtypeName == NameToken.Type1C)
|
||||||
{
|
{
|
||||||
var bytes = str.Decode(filterProvider);
|
var bytes = str.Decode(filterProvider);
|
||||||
var font = compactFontFormatParser.Parse(new CompactFontFormatData(bytes));
|
var font = compactFontFormatParser.Parse(new CompactFontFormatData(bytes));
|
||||||
return font;
|
return font;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (subtypeName == NameToken.Type1C)
|
if (subtypeName == NameToken.OpenType)
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
else if (subtypeName == NameToken.OpenType)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -151,7 +148,7 @@
|
|||||||
throw new PdfDocumentFormatException($"Unexpected subtype for CID font: {subtypeName}.");
|
throw new PdfDocumentFormatException($"Unexpected subtype for CID font: {subtypeName}.");
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new NotSupportedException("Cannot read CID font from subtype.");
|
throw new NotSupportedException($"Cannot read CID font from subtype: {subtypeName}.");
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
throw new NotSupportedException("Currently only TrueType fonts are supported.");
|
throw new NotSupportedException("Currently only TrueType fonts are supported.");
|
||||||
|
Reference in New Issue
Block a user