[XeTeX] An OTF feature problem...

Stephen Moye stephenmoye at mac.com
Sat May 28 13:24:56 CEST 2005

I am writing a series of macros that specialize in the creation of type specimens. I have begun on some using XeTeX, but have come up against a problem. When I specify a feature such as +onum the width of the string and the size of the font are incorrectly calculated. Am I doing something wrong? Thanks for any help.

Here is the plain TeX code showing the problem:


%!TEX TS-program = xetex

%% These macros produce samples of text
%% using OTF fonts that have optical variations
%% Part of the ongoing TypeSpec project



\def\captsamp{Quick wafting zephyrs vex bold Jim.
Sphinx of black quartz, judge my vow.
The five boxing wizards jump quickly.
Pack my box with five dozen liquor jugs.}

%% Given the font and the width to be filled
%% find the scaling necessary to sale the
%% font to fit the text to the width
\divide\finsize by \divisor 
\dspsize=\finsize pt 

\font\dsp="\testfont/S=14" at .1pt%
\font\dsp="\testfont/S=\number\finsize" at .1pt%
\font\dsp="\testfont/S=\number\finsize" at .1pt%
\font\fitit="\testfont/S=\number\finsize" at \dspsize
%% The following five lines are optional
%% and can be commented out.
%% This conforms to Adobe's classification
%% of size variants.
\ifnum\finsize>23 Display%
	\else\ifnum\finsize>15 Subhead%
	\else\ifnum\finsize>9 Text%
	\else Caption\fi\fi\fi,\ \the\dspsize\smallskip



\makesample{Brioso Pro}


\makesample{Brioso Pro:+onum}


More information about the XeTeX mailing list