[XeTeX] XeTeX and "ignore sub" substitution rules

mskala at ansuz.sooke.bc.ca mskala at ansuz.sooke.bc.ca
Mon Nov 28 21:10:23 CET 2011


Here's a stripped-down example of the problem.  The attached OTF font
contains rules in the "clig" feature saying that "a b" should be replaced
by "a B" (i.e. the b is changed to upper case) except when it is followed
by "c".  For greater clarity, the feature file is also attached.  Testing
in FontForge's "metrics" window requires me to manually turn on "clig"
(which should be on by default) but with the feature turned on, the
substitution and non-subsitution happen as expected.

When I run the attached .tex file through XeLaTeX with the attached font,
"aba" becomes "aBa" as it should, but "abc" becomes "aBc", whereas
FontForge leaves it as "abc" (which I think is correct).  The ignore rule
doesn't seem to be processed by XeTeX.

Confirmed on a couple of different installations, but I'd be interested to
hear whether it happens for anyone else.  Apostolos Syropoulos sent me a
font using ignore rules and reported to work correctly, but I haven't
finished testing myself whether that one works for me.
-- 
Matthew Skala
mskala at ansuz.sooke.bc.ca                 People before principles.
http://ansuz.sooke.bc.ca/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testfont.otf
Type: application/octet-stream
Size: 3848 bytes
Desc: 
URL: <http://tug.org/pipermail/xetex/attachments/20111128/af498d6c/attachment-0001.obj>
-------------- next part --------------
languagesystem DFLT dflt;
languagesystem latn dflt;

feature clig {
  ignore sub a b' c;
  sub a b' by B;
} clig;
-------------- next part --------------
\documentclass{article}

\usepackage{fontspec}

\begin{document}

\setmainfont[Path=./]{testfont.otf}

aba

abc

\end{document}


More information about the XeTeX mailing list