mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-10-15 19:54:52 +08:00
check if 'fontProgram' is null in Type2CidFont.GetWidthFromFont()
This commit is contained in:
@@ -48,6 +48,11 @@
|
||||
|
||||
public decimal GetWidthFromFont(int characterIdentifier)
|
||||
{
|
||||
if (fontProgram == null)
|
||||
{
|
||||
return GetWidthFromDictionary(characterIdentifier);
|
||||
}
|
||||
|
||||
if (fontProgram.TryGetBoundingAdvancedWidth(characterIdentifier, cidToGid.GetGlyphIndex, out var width))
|
||||
{
|
||||
return width;
|
||||
|
Reference in New Issue
Block a user