Skip to content

Commit

Permalink
Fix calculateEncodingMapping in PDType1Font
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximPlusov committed Nov 24, 2023
1 parent 3296acf commit abb32d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/verapdf/pd/font/type1/PDType1Font.java
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public Double getWidth(int code) {
@Override
protected Encoding calculateEncodingMapping() {
Encoding encoding = super.calculateEncodingMapping();
if (encoding.getSize() == 0) {
if (fontMetrics != null && encoding.getSize() == 0) {
encoding = new Encoding(fontMetrics.getEncodingScheme(), getDifferences());
}
return encoding;
Expand Down

0 comments on commit abb32d2

Please sign in to comment.