Different Colour for Diacritics

Ashfaq_Niazi's picture

I want the Diacritics in different colour than base character. i.e. Arabic Alif in Black and its corresponding diacritic in Red. My font have arabic characters. I am working in MS Word 2003. Created OTF using VOLT. No success as yet. Any Solution??? Thanx

riccard0's picture

You could move the thread to the Arabic Typography & Type Design section (http://typophile.com/forum/366) for a better chance of an answer.

DTY's picture

This isn't really an Arabic question per se; it's more of a Build question if anything. And an interestingly difficult one. I don't think Word or any major layout program allows different elements of a single glyph to have different colors (without converting to outlines), so it would require a solution where the diacritic is a separate glyph from the base character, but contextually positioned relative to that character. And then the color would have to be applied by the end user (perhaps aided by scripting). Or am I missing some easier way to do it?

John Hudson's picture

In Word, display/colouring of Arabic marks is controlled at the application options level based on the OpenType GDEF table 'mark' category, i.e. glyphs designated in the GDEF table as marks will be separately coloured from base letters. This is a pretty crude mechanism, and one that I hope to see replaced or accompanied by a more sophisticated approach that will enable font developers to specific exactly which glyphs should be coloured separately. The present mechanism cannot distinguish between diacritic marks and e.g. decomposed dots, which makes it break for nastaliq and other styles in which dot decomposition and dynamic positioning is the most efficient way to shape the script.

Note also that to take full advantage of the current Word mechanism you need to decompose some precomposed Unicode Arabic characters such as أ and إ using the OpenType 'ccmp' feature, and then position the hamza signs as marks. Otherwise they will not be separately coloured.

VOLT writes the GDEF table, so as long as your mark glyphs are categorised as such in the VOLT glyph info, this should work. You need to categorise them as marks in order to use them in anchor attachment GPOS lookups anyway.

In Word, open the Options and look for the diacritic display options. I can't remember exactly where these are in Word 2003.

AzizMostafa's picture

@ Archaica: I don't think Word or any major layout program allows different elements of a single glyph to have different colors (without converting to outlines)…

• Word2003 > Tools > options > show different color of diacritics.
Diacritics could be printed in the chosen color.

• MirEmad (http://typophile.com/node/48495) latest version makes it easy to separately color+size hamzas+diacritics+dots in 2 steps:
1. de(com)positioning and positioning back one occurrence, then
2. macro-recording to find+paste the rest occurrences.

Happy watching with Flowers:

Ashfaq_Niazi's picture

Thanks for the reply of archaica, have good suggestion to try placing Diacritics through contextual placement, instead of mark positioning, Will try to assign Diacritics as character not marks. But I am not sure will this work in searching the text or not. Let try.
Also thankx for John for details reply, but my issue is not to colour all diacritics, I want to do this with some Diacritics. Words option to colour Diacritic will colour all.
I will try another option to use Kashida or 200C, 200D Characters. Will see what happen.

For Aziz, my question was to display Diacritics in colour in MS Word, not in InDesign. Does your font work in MS Word to display Diacritics in different colours.
.........Happy Flowers..........

AzizMostafa's picture

@ Does your font work in MS Word to display Diacritics in different colours.

Not only in InDesign, but also in M$ Word 2003, 2007 + 2010.
Not only on Windows Xp, but also on Windows Vista + 7
Not only on Windows, but also on Apple Mac.
Not only in Arabic, but also in Urdu + Jawi + Pegon
For Windows or Mac, MirEmad is the best?!
All the best with Flowers

Ashfaq_Niazi's picture

Dear Aziz, the screen shorts are only in black colour, I ask you display Diacritics in Different colours in word.

I asked here about suggestion, and advice how to do this, not asked to start discussing the capabilities and features of your font, which I saw in so many posts.

In most of the posts, I saw instead of any advice or suggestion, everywhere you post your font features, and links. We need to discuss real problems here, not to see your fonts capabilities. If you can't help about the topic, so you don't need to justify MirEmad everywhere.

Happy Flowers..............

AzizMostafa's picture

@ We need not to see your fonts capabilities.
@ … so you don't need to justify MirEmad everywhere.

Not my fonts capabilities, but MirEmad capabilities?!
Or justifying MirEmad elsewhere is more confusing than illuminating to you?!

John Hudson's picture

I believe the problem here is particular to the way in which Microsoft handles letter+mark combinations in Word and in at least some other applications (I've tested Wordpad, but not yet any of the browsers). There is no way to select and colour individual combining mark characters independently of the letter base to which they are applied. I've confirmed that this is still the case in Word 2010.

So I'm afraid the only help I can offer is to suggest that you try InDesign ME.

Ashfaq_Niazi's picture

Thanks John for your brief reply and suggestion of InDesign.

I am trying to create something which is not bound with some specific application, like InDesign, my purpose is to run this font on all Platforms.

As I said earlier, will try to use Diacritics as simple glyph instead of Marks, and will see the response of font and Word.

If got success, will share my experience.

John Hudson's picture

I don't think this is a font issue. I think it is an application and layout engine issue, and I suspect Microsoft are making decisions about colouring marks with bases on the basis of character level analysis in their Arabic shaping engine, so nothing you do at the glyph level is likely to have any impact.

Syndicate content Syndicate content