[XeTeX] Minion Pro Sylistic Alternates in Win32 XeTeX
Jonathan Kew
jonathan_kew at sil.org
Wed Mar 21 22:40:37 CET 2007
On 21 Mar 2007, at 8:10 pm, jeffdod at netzero.net wrote:
> Hello All,
>
> I am using the Adobe Minion Pro font in Win32 XeTeX for a project
> that makes extensive use of Minion Pro's polytonic Greek character
> set. In this character set, there is a set of alternate Greek
> capitals that I would like to use instead of the default. I have
> found that by using the fontspec command "Style=Alternate" I can
> activate the capitals I want. However, this also selects alternates
> for all other sets of characters as well (i.e. for lowercase
> letters), which I do not want. Is there a way that I can select just
> the alternate Greek capitals without upsetting the rest of the
> character set?
XeTeX gives you access to whatever features the font developer has
chosen to provide, so the question is whether Minion Pro provides an
OpenType feature that selects the alternate caps you want *without*
simultaneously selecting other alternates that you don't want. And
I'm guessing that the answer is no, if you've tried things like +salt
and the various +ss## options without success.
(Note that XeTeX can give you a list of all the feature tags
supported by a font, to guide your experimentation; see the OpenType-
info.tex file from the old xetex samples archive on the web site. Or
if you have the MS Font Properties extension installed -- sorry, not
sure of the exact name -- then there's a tab in the Properties window
for the font file where you can inspect the features. Neither of
these will tell you the exact collection of glyphs affected by a
given feature, though, so you'd still need to try some tests.)
Assuming there's no feature that provides the effect you want, the
other option is to resort to TeX macro trickery to set the +salt
feature (I assume that's what fontspec calls [Style=Alternate]) just
for the Greek capitals, while leaving it off for the rest of the
text. Something along the lines of (untested code written in Mail)....
% use Minion Pro as the main font
\setmainfont{Minion Pro}
% declare a variant with alternate glyphs
\newfontfamily\minionalt[Style=Alternate]{Minion Pro}
% make Greek capitals use the alternate font
\catcode"0391=\active \def^^^^0391{{\minionalt\char"0391}} % Alpha
\catcode"0392=\active \def^^^^0392{{\minionalt\char"0392}} % Beta
\catcode"0393=\active \def^^^^0393{{\minionalt\char"0393}} % Gamma
%...etc...
\catcode"03A9=\active \def^^^^03a9{{\minionalt\char"03A9}} % Omega
(There are "clever" ways to define the chars more concisely using a
loop, etc., but this is to illustrate the idea.)
A disadvantage of this approach is that it will inhibit any kerning
between the capitals and adjacent lowercase letters, because of the
font switch (in TeX terms, even though they're variants of the same
font). I don't know how serious this will be in your case, but it's
something to consider.
Clearly, the best solution is for the font to explicitly provide
features that correspond to the various combinations of glyph choices
that users want to access. The "stylistic sets" features would be the
most likely choice for this, I think, but I don't know what Adobe has
chosen to implement.
JK
More information about the XeTeX
mailing list