Skip to content

Commit

Permalink
Merge pull request #627 from rototor/fix-font-npe
Browse files Browse the repository at this point in the history
Fix font npe
  • Loading branch information
danfickle committed Jan 2, 2021
2 parents 989e0de + 7fc55be commit 08665aa
Showing 1 changed file with 17 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,20 +96,23 @@ public PdfBoxRenderer buildPdfRenderer(Closeable diagnosticConsumer) {
if (font.usedFor.contains(FSFontUseCase.DOCUMENT)) {
IdentValue fontStyle = null;

switch (font.style) {
case NORMAL:
fontStyle = IdentValue.NORMAL;
break;
case ITALIC:
fontStyle = IdentValue.ITALIC;
break;
case OBLIQUE:
fontStyle = IdentValue.OBLIQUE;
break;
default:
fontStyle = null;
break;
}
if (font.style != null) {
switch (font.style)
{
case NORMAL:
fontStyle = IdentValue.NORMAL;
break;
case ITALIC:
fontStyle = IdentValue.ITALIC;
break;
case OBLIQUE:
fontStyle = IdentValue.OBLIQUE;
break;
default:
fontStyle = null;
break;
}
}


// use InputStream supplier
Expand Down

0 comments on commit 08665aa

Please sign in to comment.