Hello,
I know I’m quite late to the party but with my father and thanks to ajlittoz suggestion, some trial and error and also a bit of luck I finally figured out how to write colored diacritis without character offset.
First of all, the display of characters is highly dependent on the font type. In the case of Hebrew there’s only one font which is able to display colored diacritics in the correct place, which is a specialized font called ‘accordance’. I chose to try this font since it is the same my Hebrew teacher used to create her PDFs with and she managed to color them with a subscription based program.
The font however is fortunately available for free download and usage.
So, I went ahead and created character styles for simple consonants without diacritis in black color, and then for diacritics in different colors. Once I did that, I was able to switch between different colors for the diacritics as I pleased but I encountered the same offset problem from before.
By chance however I found a way to write perfect colored diacritis, I’ll try to explain it step by step:
Step 1: Choose ‘Hebrew’ as the writing language (and also a Hebrew keyboard layout)
Step 2: Press space one time, then switch to the ‘Hebrew consonant’ character style.
Step 3: Switch to the character style for the diacritics (for example ‘diacritics red’) and type the desired vowel marker. Now the diacritic will be red and in perfect position under the consonant and one doesn’t even need to use the hexadecimal encoding. It is possible to simply write the diacritic using the keyboard. If one wants to switch back to black, select ‘Hebrew consonant’ again.
See the example image below:
As you can see on the right, I created a character style ‘Hebräisch Konsonanten’ (Hebrew consonants) and ‘Nikkud rot/grün’ which is for red and green diacritics.
So, for other languages like Arabic for example, it might be worth looking for a document which contains colored diacritics, then to search this specific font and using the same steps as above. Since the font I use was created for teaching applications, I assume that they had colored diacritics in mind which is why they can be displayed perfectly.
Thanks again for the support and with regards
Wolfram