[XeTeX] OpenType ligatures

Adam Twardoch list.adam at twardoch.com
Fri Nov 24 21:32:16 CET 2006


Apostolos Syropoulos wrote:
> Can you suggested one? 
First of all, I'm not entirely convinced that you want your ligature 
substitution only happen when the glyphs are preceded by space and 
followed by space. What if the glyphs are not followed by any other 
letters and not preceded by any other letters but are at the beginning 
or at the end of the line? Should the ligature substitution not happen 
then? That's a bit nonsensical (at least provided how I understand the 
purpose of this ligation).

My guess is that you actually want the ligature substitution happen when 
the glyphs are not followed by any printable glyphs and not preceded by 
any printable glyphs. Using the AFDKO/FLS notation, this would be:

feature hist {
  ignore sub @TEXT g' a' r';
  ignore sub g' a' r' @TEXT;
  sub g' a' r' by g_a_r;
} hist;

(provided that @TEXT is a class that includes all textual/printable 
glyphs except space). This will work if the string "gar" is surrounded 
by either spaces or the beginning/end of a line from both sides.

A.

-- 

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



More information about the XeTeX mailing list