Hi,
See the javadoc: "character code in a PDF. Not to be confused with
unicode." this is a trap, sadly. See the EmbeddedMultipleFonts.java
example on how to do it. Tldr: you try and catch the exception that you
mentioned in the mail.
Tilman
Am 10.05.2026 um 19:34 schrieb Emmanuel DUFOUR:
Hello,
When I call PDType0Font.hasGlyph(40), asking if my font
<https://fonts.google.com/noto/specimen/Noto+Sans+Arabic?preview.script=Arab>
has
the glyph for "(" , it returns true, but when I try to call
contentStream.showText("(");
using this font I get
java.lang.IllegalArgumentException: No glyph for U+0028 (() in font
NotoSansArabic-Regular
at org.apache.pdfbox.pdmodel.font.PDCIDFontType2.encode(
PDCIDFontType2.java:401)
The font doesnt seem to have that glyph indeed, but why would font
.hasGlyph() return true then ?
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]