bai yuan created PDFBOX-5923: -------------------------------- Summary: The font "Droid Sans Armenian" throw an exception when rendering text Key: PDFBOX-5923 URL: https://issues.apache.org/jira/browse/PDFBOX-5923 Project: PDFBox Issue Type: Bug Affects Versions: 2.0.32 Reporter: bai yuan Attachments: DroidSansArmenian.ttf, image-2024-12-17-17-33-30-940.png
Using PDType0Font.load to load the attach font, it will throw an exception when rendering text. !image-2024-12-17-17-33-30-940.png! {code:java} try (PDDocument document = new PDDocument()) { PDPage page = new PDPage(); document.addPage(page); TrueTypeFont ttFont = new TTFParser().parse("DroidSansArmenian.ttf"); PDFont font = PDType0Font.load(document, ttFont, false); PDPageContentStream contentStream = new PDPageContentStream(document, page); contentStream.beginText(); contentStream.setFont(font, 12); contentStream.newLineAtOffset(100, 700); contentStream.showText("abc"); contentStream.endText(); contentStream.close(); document.save("output.pdf"); } catch (Exception e) { e.printStackTrace(); } {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org