[XeTeX] "Hoefler Text" XeLaTeX interface

Stephen Moye stephenmoye at mac.com
Mon Oct 4 14:58:58 CEST 2004


I tried the bit of code below, but the console complains: 

! Argument of \getfeatures has an extra }.

For the life of me I can't see what the problem is.
 
On Monday, October 04, 2004, at 08:09AM, Jonathan Kew <jonathan_kew at sil.org> wrote:

>As a starting point, you could try this....
>
>%%%%%%%%%%%%%%%%%%%%%%%%%
>\def\myfont{Hoefler Text}
>\font\testfont="\myfont" at 24pt
>\testfont
>\nopagenumbers \frenchspacing
>
>\def\XeTeXchangefontfeature#1{%
>   \edef\currentfont{\fontname\font\space}%
>   \expandafter\getsizeandfeatures\currentfont at 10pt\relax
>   \edef\newfeatures{\ifx\currfeatures\empty
>     #1\else\currfeatures;#1\fi}%
>   \font\newfont="\currfontname:\newfeatures" \currsize \newfont}
>\def\getsizeandfeatures "#1" #2at #3\relax
>  {\def\currfontname{#1}%
>   \def\currsize{#2}\ifx\currsize\empty\def\currsize{at 10pt}\fi
>   \expandafter\getfeatures\currfontname::\relax}
>\def\getfeatures #1:#2:#3\relax
>   {\def\currfontname{#1}\def\currfeatures{#2}}
>
>This is a test for the
>{\XeTeXchangefontfeature{Letter Case=Small Caps}Small Caps feature}
>in the Hoefler Text font.
>And here's {\XeTeXchangefontfeature{Letter Case=All Capitals;Style 
>Options=Engraved Text}some text showing the Engraved Capitals.}
>
>\end
>%%%%%%%%%%%%%%%%%%%%%%%%%



More information about the XeTeX mailing list