[ https://issues.apache.org/jira/browse/PDFBOX-5923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17906369#comment-17906369 ]
Tilman Hausherr commented on PDFBOX-5923: ----------------------------------------- That's because it covers the Armenian alphabet https://en.wikipedia.org/wiki/Armenian_alphabet Here's what I get with DTL: !screenshot-1.png! > 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 > Priority: Major > Attachments: DroidSansArmenian.ttf, > image-2024-12-17-17-33-30-940.png, screenshot-1.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