[XeTeX] Kerning support

Adam Twardoch list.adam at twardoch.com
Mon Apr 21 16:45:49 CEST 2008

The easiest is to just look up the current kerning value and change it. 
For example, in Myriad Pro the kerning value between the class that 
consists of quoteright and quotedblright and the class that consists of 
comma, period and ellipsis is -154.

The safest way to deal with TTX is to dump and later merge only the 
relevant table, not the whole font. In case of OpenType kerning, the 
relevant table is GPOS. So:

ttx -tGPOS MyriadPro-Regular.otf

After converting the GPOS table of the .otf OpenType file to a .ttx XML 
file, I look for the string "-154" (including the quotation marks). I 
get only one occurance of that:

            <Class2Record index="34">
              <Value1 XAdvance="-154"/>

I simply change the value -154 to whatever I want and merge the modified 
GPOS table back into the .otf font. (If the value occurs several times, 
you may want to do several attempts or try to understand the internal 
structure of the GPOS table, but it's a bit more complex than I could 
explain here.)

ttx -m MyriadPro-Regular.otf MyriadPro-Regular.ttx

We will get a file MyriadPro-Regular#1.otf which will have the modified 


Charles de Miramon wrote:
> Adam Twardoch wrote:
>> Changing one or two kerning pair values in your own local copies of a
>> font is trivial using
>> http://www.font.org/software/ttx/
>> (just convert the font to XML, change the values using a text editor and
>> convert the font back to OTF). The license agreement for Adobe fonts
>> allows that.
>> A.
> Could you explain for fonts newbies, where and what do you modify in the XML
> file to add some space between a quote and a final punctuations.
> Cheers,
> Charles 


Adam Twardoch
| Language Typography Unicode Fonts OpenType
| twardoch.com | silesian.com | fontlab.net

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/xetex/attachments/20080421/c9459665/attachment.html 

More information about the XeTeX mailing list