Right to Left Kerning

  • Hi,

    Please correct me if I'm wrong but I have worked with RTL kerning before in other softwares/platforms (e.g fontlab) but I don't think "right to left kerning" is working as supposed to be in Robofont 1.4. For one reason when I type رب the order of letters is right before I turn the "Right to left" option on. After turning the option on, order of the letters becomes reversed and when I put kerning between them, kerning is implemented in reverse order. And what is the purpose of this option if I generate the font and the kerning is working in LTR behavior. I checked the generated OTF file and in opentype code kerning code is like this:

    pos uni0631 uni0628 -225;

    But RTL kerning code should be like this:

    pos uni0631 uni0628 <-225 0 -225 0>;

    I think Robofont should have other method of storing and generating RTL kerning, Am I wrong?


  • Anyone?! Fredrickkk!!

  • Perhaps in this case it would be easier to write the feature code for the kern feature directly instead of using space center?

  • Oh thanks Jens, I was starting to think that my arguments were so stupid, so nobody wants to answer me!

    Yes, This is the case every time I'm implementing Kerning in Farsi/Arabic fonts. I always have to rely on external python scripts to generate the RTL kerning (except in the Glyphs app that handles it natively and brilliantly intuitive). I really wished that an app could do this without any inconvenient scripting. I can write simple tools but I would rather to concentrate more on design than writing programs. When I saw Robofont 1.4 enhancements and the feature list, I thought finally we have it in Robofont, bummer!

  • I just red that UFO 3 stores RTL kerning in a different way, maybe that could help in next versions to avoid problems with it?

  • admin


    UFO3 doesn't store the kerning any different. What really has changed is the naming form left/right to first/second.

    see http://unifiedfontobject.org/versions/ufo3/kerning.html

    The kerning data is writing direction neutral. For text written left-to-right, the left-most glyph is the key in the top level dictionary. For text written right-to-left, the right-most glyph is the key in the top level dictionary. For example, given the pair LG, written left-to-right, the L is the key in the top dictionary and the G is the sub-dictionary. Given the pair GL, written right-to-left, the G is the key in the top dictionary and the L is the key in the sub-dictionary.

    can you explain me the difference between:

    pos uni0631 uni0628 -225;
    pos uni0631 uni0628 <-225 0 -225 0>;
    (adjustment for <X-placement Y-placement X-advance Y-advance>)


  • I don't know the difference! But in fontlab when I open a font, in the kern feature I can see that LTR kerning is interpreted like this:

    pos uni0631 uni0628 -225;

    But RTL kerning is interpreted like this:

    pos uni0631 uni0628 <-225 0 -225 0>;

    So I suppose RTL kerning should be implemented with adjustments applied to position of the glyph too, maybe I'm wrong; I'm not a pro. (see AFDKO OpenType Feature File Specification)
    About the kerning in RoboFont, I think there is a malfunction in the "Right to left" Option in the kerning panel. Here is what I do:

    I open a font which already has RTL kerning, Robofont interprets kerning correctly. I open the kerning panel and click on a class pair, the kerning shows up but order of glyphs is incorrect, I turn the "Right to Left" option on; Nothing Happens! I turn it off, now order of glyphs becomes right, even so the kerning has been implemented in RTL order.