ccmp and mark/mkmk - stacked diacritics

JanekZ's picture

I want to make to operate stacking diacritics, for example ocircumflex with breve above. First way to type it is: ocircumflex + breve, the second: o + circumflex + breve. I made it that way:
1. ocircumflex is decomposed to o + circumflex
2. o and circumflex are positioned via mark
3. circumflex and breve are positioned via mkmk
So whatever combination you type (o ̂ ̆) or (ô ̆) you get proper stacked letter. It works beautifully in FontForge but to my astonishment only in FF. What is going on? Please help with this enigma.

Khaled Hosny's picture

With no font to check (or at least feature code snippet, if you are writing feature files), it is hard to tell what is going on.

Staping in the dark, my first guess would be broken application(s), try testing in Notepad in Windows and/or Firefox, if still broken then make sure you have set script and language correctly for your feature.

paul d hunt's picture

Janek,
I've recently added the exact behavior you're describing to a font family on which I have been working. However, I compiled my fonts using the AFDKO. The resulting fonts have the correct behavior in MS Word (I tested version 10 on XP) and in InDesign CS6 with the World Ready composer applied (there seems to be a bug in this regard in the default composer). Those were the only instances that I tested. I've sent the font off to someone who does Jarai typography in XeLaTeX, I'll post back with his results, if interested.

Here's my decomposition code in FDK syntax. Note the lookup titled DECOMPOSITION is outside of any feature block and before the feature. Also beware of the wrapping commented line below:

lookup DECOMPOSITION {
sub Ecircumflex by E circumflexcmb;
sub ecircumflex by e circumflexcmb;
sub Ocircumflex by O circumflexcmb;
sub ocircumflex by o circumflexcmb;
} DECOMPOSITION;

feature ccmp { # Glyph Composition / Decomposition

lookup GLYPH_DECOMPOSITION_CONTEXTUAL_2 {
#decomposes ecircumflex and ocircumflex forms when followed by combining breve: Jarai language support
sub Ecircumflex' lookup DECOMPOSITION brevecmb;
sub ecircumflex' lookup DECOMPOSITION brevecmb;
sub Ocircumflex' lookup DECOMPOSITION brevecmb;
sub ocircumflex' lookup DECOMPOSITION brevecmb;
} GLYPH_DECOMPOSITION_CONTEXTUAL_2;

} ccmp;

JanekZ's picture

Thanks a lot Khaled!
Font works in FireFox as expected. I didn't expect I can write on Pablo Impallari test page, but it works.
Then what about InD? [edit] Aha, I see... Thanks Paul!



in brackets is the input (with spaces) and glyphs on the right
FireFox 14, http://www.impallari.com/testing/

JanekZ's picture

A bit shorter feature file with classes: (sub part only)

sub [Ecircumflex ecircumflex Ocircumflex ocircumflex]' lookup DECOMPOSITION [brevecmb uni0306];

JanekZ's picture

Paul:
"I've recently added the exact behavior..."
Post on your blog inspired me to explore ccmp and mark/mkmk. Especially ccmp is modestly documented.
"However, I compiled my fonts using the AFDKO."
FontForge uses AFDKO syntax, so your fea file was merged without any problems and modifications. Probably every AFDKO feature is supported by FF.
"(there seems to be a bug in this regard in the default composer)"
What a pity! There are fonts (yours and Brill by John/Tiro at the very least) and InD does not fully support them.
Thank you both for your prompt replies.
regards

Syndicate content Syndicate content