From e164b62189a882610f151ca112386c6bb41c1147 Mon Sep 17 00:00:00 2001 From: Alexander Dyuzhev Date: Mon, 13 Dec 2021 21:13:03 +0300 Subject: [PATCH] Arabic Text Marker replace by Zero Width Space, metanorma/isodoc#354 --- src/main/java/org/apache/fop/fonts/MultiByteFont.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/org/apache/fop/fonts/MultiByteFont.java b/src/main/java/org/apache/fop/fonts/MultiByteFont.java index 43b51606..90b5b2fa 100644 --- a/src/main/java/org/apache/fop/fonts/MultiByteFont.java +++ b/src/main/java/org/apache/fop/fonts/MultiByteFont.java @@ -674,6 +674,13 @@ private GlyphSequence mapCharsToGlyphs(CharSequence cs, List associations) { } notifyMapOperation(); gi = findGlyphIndex(cc); + + if (gi == SingleByteEncoding.NOT_FOUND_CODE_POINT && cc == 0x061C) { // ARABIC LETTER MARK + //replace to ZERO-WIDTH SPACE + cc = 0x200B; + gi = findGlyphIndex(cc); + } + if (gi == SingleByteEncoding.NOT_FOUND_CODE_POINT) { warnMissingGlyph((char) cc); gi = giMissing;