[XeTeX] Kerning
John Was
john.was at ntlworld.com
Tue Jun 19 15:23:58 CEST 2007
Hello
I wonder if there exists, or there are plans for, a facility to modify the kerns of a Unicode and/or outline font within XeTeX without specifically editing the font (which in itself could infringe the licence)?
There are much less likely to be instances of poor kerning between characters in Unicode fonts, since the designer will (probably) have gone through the entire set, implementing kerns for all the pairs (s)he thinks will occur, but even so there are bound to be instances that have not been thought of: for example, in transliterated Arabic it is common to use a greek asper and lenis for ayin and hamza, and before a capital A (in roman or italic) this can look too gappy: one wants to bring the Greek breathing close to the apex of the A.
At present I deal with such cases by having e.g. {\ayinA} in my document, with the \cs defined as e.g. {`\kern -0.125em A} (the first character after the { is meant to be a Greek asper). Much more elegant would be e.g.:
\myfont = "Minion Pro" at 11pt
\input myfont.krn
or, if fully integrated into XeTeX, something like:
\myfont = "Minion Pro"[:myfont.krn] at 11pt
The file myfont.krn would be a list of user-defined kerns to be applied to \myfont only within the document, e.g. something like:
Q+] krn 250
This would tell TeX to use a 250-unit kern between Q and ] (useful if the font has an especially elaborate form of tail on the Q).
If this works in principle, it could be extended to include automatic invocation of ligatures, perhaps even from a different font - if one were, say, experimenting with an ancient Greek font that would automatically invoke the large number of old Greek ligatures, or German Fraktur (not that I'll ever get round to the Greek project as Y.H. has resisted all attempts by me to get him to return my font book!). (So instead of 'krn' in the list we would have e.g. 'lig' - or whatever simple syntax seems best.)
There may be reasons beyond my understanding why this is impossible, or considered a bad idea, but I would certainly appreciate the facility to fine-tune kerning within TeX rather than pull a font to bits for the sake of a small cosmetic adjustment - just as most users (I suspect) like to say something like:
\input myhyphens
in order to implement hyphenation of specialized words or languages that TeX regularly hyphenates in an unsatisfactory way, without getting immersed in the complexities of writing fresh hyphenation patterns.
Best
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/xetex/attachments/20070619/df027fdf/attachment.html
More information about the XeTeX
mailing list