mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-09-18 18:27:55 +08:00
Merge pull request #210 from Poltuu/add_font3_name
ADD : name on type 3 fonts
This commit is contained in:
@@ -49,11 +49,23 @@
|
||||
toUnicodeCMap = CMapCache.Parse(new ByteArrayInputBytes(decodedUnicodeCMap));
|
||||
}
|
||||
}
|
||||
|
||||
return new Type3Font(NameToken.Type3, boundingBox, fontMatrix, encoding, firstCharacter,
|
||||
|
||||
var name = GetFontName(dictionary);
|
||||
|
||||
return new Type3Font(name, boundingBox, fontMatrix, encoding, firstCharacter,
|
||||
lastCharacter, widths, toUnicodeCMap);
|
||||
}
|
||||
|
||||
private NameToken GetFontName(DictionaryToken dictionary)
|
||||
{
|
||||
if (dictionary.TryGet(NameToken.Name, scanner, out NameToken fontName))
|
||||
{
|
||||
return fontName;
|
||||
}
|
||||
|
||||
return NameToken.Type3;
|
||||
}
|
||||
|
||||
private TransformationMatrix GetFontMatrix(DictionaryToken dictionary)
|
||||
{
|
||||
if (!dictionary.TryGet(NameToken.FontMatrix, out var matrixObject))
|
||||
|
Reference in New Issue
Block a user