Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

AAT insertion feature

Hello everyone,


I am currently developing an OpenType font for Khmer and I would like to add AAT features to it. I already got used a bit to the AAT feature coding style, but I still have some problems especially with the insertion feature. I just try to explain what I would like my font to do without posting any code. I hope that is OK …


For a Khmer font to work properly, glyph rearrangement is needed, since some vowel signs are placed before or even around a consonant. This is the case for E, AE, AI (written before a consonant), and for OO, AU, OE, YE and IE (they all have a vowel-e element written before the consonant and another element written above or behind the consonant).


Also, Khmer uses so-called subscript letters. These are consonant letters that are attached to the main consonant letter and build a consonant cluster.Typically they are written underneath or next to the main consonant letters. There is one exception for RO, whose subscript form is written before the main consonant.


If you have the syllable KROO, it would consist of the letters KA + Subscript RO + Vowel OO but written like E (first part of Vowel OO) + Subscript RO + KA + AA (last part of Vowel OO). Subscript letters are typed in with a combination of an invisible subscript mark followed by the consonant. So, syllable KROO would be typed in as: KA + Coeng (the subscript mark) + RO + OO.


This structure is quite complex, what is why implementing AAT features is quite a challenge … at least for me!


So, what we need for a syllable structure like the one above, is the following:

We want to go from:

KA + Coeng + RO + OO

to:

E + Subscript RO + KAA (with E and AA being the surrounding elements that make together the Vowel O and KA + AA forming the ligature KAA.


First step:

Insert E in front of OO and than substitute OO with AA

(Result: KA + Coeng + RO + E + AA)


Second step:

Substitute Coeng + Consonant with Subscript Consonant

(Result: KA + Subscript RO + E + AA)


Third step (I added this step, because I didn’t get the double rearrangement right)

Substitute Subscript RO + E to a special ligature (E_RO)

(Result: KA + E_RO + AA)


Forth step:

Make a rearrangement of every E, Subscript Ro and the special ligatures E_RO

(Result: E_RO + KA + AA)


Forth step:

Make final ligatures of consonants and AA

(Result: E_RO + KAA)


So far so good. But somehow it doesn’t work the way it should. There seems to be a problem with the insertion feature, especially with the kashida-like option. For some combinations it works only if I make the insertion kashida-like, for other combinations it works only if it is not kashida-like. Problems are invisible characters, character placement way above the baseline (I really don’t get this one) or even crashes.


So, what is wrong with my approach? I was so proud of finally having a working solution after I neary despaired with the double replacement of E and Subscript RO, but somehow it doesn’t work either! Maybe I should do it in another way? I also thought of inserting E, RO and E_RO directly in front of the first main consonant … but this didn’t work for another reason. It would be great if I could use this approach!


I guess it has to to with the kashida-likeness, so if someone could tell me what exactly is meant by “Kashida like” that would be awesome!


Thank you so much!

Greetings from Germany

MacBook Pro, Mac OS X (10.6.8)

Posted on Apr 9, 2012 2:10 PM

Reply
Question marked as Best reply

Posted on Apr 9, 2012 5:53 PM

Since Apple already provides 2 AAT fonts for Khmer in 10.7, Khmer MN and Khmer Sangam MN, can you see from these how they do such things?

15 replies

Apr 10, 2012 12:54 AM in response to Tom Gewecke

Hello!

Yes, I already thought of this way too. But there are two problems: First, I didn’t buy 10.7 until now, since I still have some software that won’t work with Lion and I didn’t find the Font on the Web distributed freely. And second, ftxanalyzer doesn’t seem to extract the whole morx table from the font. I tried it on several other Khmer fonts that actually work on my computer, but all I got was some commentary lines in the MIF file without any actual feature. Maybe I am doing wrong here as well, but upto now, ftxanalyzer didn’t help me at all for my purpose.

Apr 10, 2012 11:10 AM in response to Tom Gewecke

OK, I got the two Khmer fonts Apple provides with Lion now. They work fine both.

The tables I get with ftxdumperfuser are just in Hex format and look like:


<dataLine lineNumber="0" offset="00000000" hex="00020000000000010000001F0000898C" ascii="..." unicode="..." /> etc.


… I don’t really know how to deal with this?! Maybe there are other possibilities to get the morx table in a readable format. I’ll consult the Font Tools Documentary again. Thanks for your hints, though!

Apr 10, 2012 12:01 PM in response to Tom Gewecke

Yeah, I know the guy from Xenotype and already asked him about this some time ago. But since he earns a living from his knowledge, he didn’t want to tell me much. Also, he wants to create fonts, that are working with every Mac OS, and since some AAT features (like insertion as far as I understood) don’t seem to work in older versions of Mac OS properly, he had to do a lot of work-arounds. At least, that is what I understood from his answer, maybe I am wrong with this.


However, now, I checked the new Khmer fonts from Apple and there are not many work-around in it. They just created a lot of subscript glyphs that are needed, since AAT doesn’t support glyph positioning like OpenType, and also the needed ligatures. But these glyphs I created as well, and Apple did not create such work-around glyphs like I did (the E-RO ligatures or such stuff). So, somehow it does work even without any work-around, at least for Snow Leopard, Lion and above! That is why I would like to give it a new try now. Yatta! 😀

Apr 10, 2012 1:41 PM in response to Otaka-san

OK, I solved it!


Apple does it the tricky way: They just don’t use the special functions of the insertion feature. I tried to insert an vowel E before the circumscript vowels OO, AU, OE, YA and IE. Apple just inserts the backmost part behind the circumscript vowels and substitutes the original glyph by the vowel E glyph. Than they first rearrange the vowel E to the front, followed by the subscript RO.


Wow! I can’t really believe that it finally works! I worked so long to solve this problem! Oh man! Thanks Tom for your support!

May 25, 2012 3:32 AM in response to Otaka-san

Khmer Unicode works well on MAC OSX Lion and ( microsoft office and adobe Photoshop CS5...) but dont work correctly on Adobe Premiere Pro CS5 / CS6 !!


If anyone has a solution, help me please 😟

Thank,


-----------------------------


Khmer Unicode fonctionne bien sur MAC OS X Lion et sur Microsoft Office, Adobe Photoshop CS5 ... mais il ne marche pas correctement avec Adobe Premiere Pro CS5 / CS6 !!


Si vous avez des solution, aider moi svp. 😟


Merci beaucoup.

May 25, 2012 6:13 AM in response to hi_khm

As far as I know, not all Adobe software actually supports all OpenType features. This is especially the case for OT features that are necessary to display Indic or Arabic writing systems correctly.


As for me, Photoshop CS5 doesn’t seem to like any other OT features than such used for Latin typography. Also, all of the Adobe stuff doesn’t work with AAT features (what is no big surprise, as OT is a development of Adobe). I don‘t use Lion but Snow Leopard, so maybe there is a differece. I heard of better OT support in Lion especially for Indic scripts. Maybe Adobe software is recurring on the OT support of the operating system, what would explain, why special OT features are not supported at all, as MacOS 10.6 doesn’t support such features as well.


I am not a pro on such things concerning application support of OT/AAT features, but I guess I am not completely wrong. There is one package of Khmer fonts that actually work quite well with MacOS and also with Adobe software, that is the fonts provided by NiDA. You should be able to find them using Google. At the moment I am still trying to get my own OT features fixed, but I didn’t get too far for now …


That’s all from me. I wish you good luck!

May 25, 2012 6:26 AM in response to Otaka-san

Another thing: I just analyzed one of the NiDA fonts to get to know why their fonts work and mine don’t (at least when using them with Adobe software). I found out that they just relied on simply one feature, that is the “liga” feature, that is supported by almost every application. They implemented the correct features for Indic scripts as well, but I guess this is just to enable Windows support as well.


So, this discovery is somewhat disappointing, as it shows that there obviously is no way to correctly implement the OpenType features needed for Indic scripts, but it seems to be necessary to use some work-around. Adobe should really implement full OT support to all of its software as soon as possible! I know, there are already working tools that support Indic glyph rendering with OT and everything, but these aren’t yet implemented for whatever reasons.

AAT insertion feature

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.