Issue:


I am working on a font in Hebrew, after I export the file, all the kerning goes wrong and the spacing between letters is completely off. Is the problem related to the fact that the language is written from right to left? How can I generate RTL kerning?


Solution:


Unfortunately the RTL kerning is not yet supported in FontLab. But there is a partial workaround which might help:


Suppose you have 2 kerning pairs in the Kerning panel:



Before you export the font:

1. Open the Features panel
2. In the local panel's menu select "Create [kern] Feature". FontLab will generate the code for your left-to-right kerning in the Features panel:


3. In the generated code, manually change the order of the glyph names (what was second becomes first) in all the Hebrew kerning pairs and change the single kerning value with  <x x x x> e.g. <-30 0 -30 0>. You can copy paste pairs to MS Excel or some smart text editor to do that faster. The final task is to convert lines:

    pos uni05DB uni05DC -120;
    pos uni05E1 uni05E2 -100;

to lines:

    pos uni05DC uni05DB <-120 0 -120 0>;
    pos uni05E2 uni05E1 <-100 0 -100 0>;

4. Paste lines with pairs to the code and correct the "kern" feature so that you get this:


5. Click on ▶︎ in the Features panel to compile OpenType features including kerning.
6. Export the font if there were no compilation errors.