Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.8
Description
This code doesn't work:
try (PDDocument doc = new PDDocument()) { PDPage page = new PDPage(); doc.addPage(page); try (PDPageContentStream cs = new PDPageContentStream(doc, page)) { PDFont font = PDType0Font.load(doc, new File("NotoEmoji-Regular.ttf")); cs.setFont(font, 50); cs.beginText(); cs.newLineAtOffset(100, 700); cs.showText("\uD83D\uDE81"); cs.endText(); } doc.save("heli.pdf"); }
It throws an exception
IllegalArgumentException: No glyph for U+1F681 in font NotoEmoji