I want to break the ‘ARABIC LETTER ALEF WITH MADDA ABOVE’(U+0622) so as I can get ALEF and MADDA both seperated into their constituent glyphs (base and mark).
In Unicode this letter is consisted of one character (integrated Alef with Madda):
So I substituted the glyph ‘AlefWithMadda’ with glyphs ‘Alef’ and 'Madda’, using the lookup Multiple Substitution (decompose), but the result comes in another ‘Merged’ character, so what’s the method to have the substitution result in two separated glyphs (base and mark) without being merged?.
You can’t change the styling of individual glyphs after substitutions. The text selection only knows about the characters, not the glyphs.
If you like to have different colors, you need a color font.
For something that has Unicode decomposition like alef with madda above, you can use the decomposed form in input text i.e. instead of inputting U+0622 you input U+0627 + U+0653. But, since the two forms (composed and decomposed) are canonically equivalent in Unicode, the decomposed form can get composed again at any stage of the text processing, and to prevent that you need to insert U+034F (combining grapheme joiner) between the two. In other words, copying and using this “ا͏ٓ” should give you two glyphs that can be colored independently without any changes to the font:
If there is no Unicode decomposed form, then, like George said, you can’t style individual glyphs after substitution, since the styling is applied per input characters.
Dr @khaled thank for the idea of adding this magic combining grapheme joiner that it’s the first time I heard of, and as you and @GeorgSeifert thankfully confirmed that there’s no possibility to change the style of decomposed glyphs, and taking into consideration that the character in question will get back in its Unicode format whenever copied again, so I don’t have but to FIND AND REPLACE in despite I work on a children book with colored diacritics that goes back and forth for reviewing all the times, so I got replace again and again… I wish oneday in OpenType they give us the possibility of styling multiple substitution results individually.
Sadly, InDesign doesn’t support CPAL/CLR only SVG color font which doesn’t support Arabic very well, the diacritics get badly corrupted and dispositioned in OTF-SVG in InDesign. And until now Adobe doesn’t want to support Microsoft CPAL/CLR Layered Fonts
Your reply made me discover something very serious! InDesign 2025-26 doesn’t support OTF-SVG Arabic fonts when it comes to color diacritics nor even regular OTF/TTF!! Now I am testing InDesign 2020 and I think things are working well !!! This is clearly A BUG in newest InDesign versions concerning adding colors to Arabic diacritics whether inside InDesign itself (GREP) or OTF-SVG colors!!.
InDesign handles Arabic fonts with SVG table in a very buggy way, all anchor attachments (whether mark or cursive) are messed up. It effects even monochromatic glyphs in the font (all you need is to include and SVG table in the font, even if it has no glyphs). I reported it to Adobe on multiple occasions, but it hs not been fixed so far.
See:
Maybe if people would upvote the issue, it would get some attention. For a while it seemed like I’m the only person whoever tried Arabic fonts with SVG table in InDesign.
I used to include SVG table as fallback for COLR table, but now since Illustrator and Photoshop support COLR table, and its handling in InDesign is so buggy, I don’t include it anymore.
@khaled i also noticed that in InDesign 2025-26 when adding color to diacritics using GREP replace using regular fonts (not SVG), the marks are all gone wild when exported to PDF, and sometimes this error occur when export more than a page to PDF:
But this doesn’t happen in InDesign 2020, even now I am experiemting with SVG fonts and they work very well, I will try long text documents and export to PDF to see. So the problem might be recent in new InDesign versions.