[XeTeX] Minion Pro Sylistic Alternates in Win32 XeTeX

Micah Cowan micah at cowan.name
Thu Mar 22 01:08:21 CET 2007


Jonathan Kew wrote:
> 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.

To me, that'd be a deal-breaker. Especially for capitals, and especially
for ones like Tau or Phi.... However, looking at what Minion's stylistic
alternatives actually /are/, they're mostly just an alternate
representation of Alpha, Eta and Omega with a small iota underneath
them, instead of to the right of them. None of those letters are likely
to kern much. The only real problem would be that the alternatives also
include an alternate breathing mark for Rho; but then, he probably
didn't care about that anyway, so he could just leave that out of the
mapping you've given above.

However: it happens that the stylistic capitals are mapped to Unicode
codepoints that fall within the "Private Use" areas of Unicode. These
codepoints may in fact be a "de facto" standard for these characters, as
at least one other font recognized them as the same characters that
Minion uses at the same location.

For instance, to get Alpha with the iota mark under it, you can use
codepoint E0F8; similarly E0F9 will give you Eta with the iota mark
under it.

If your editor doesn't make it simple to directly enter those
codepoints, or that would end up being pretty tedious for you, you could
probably do:

  \catcode"1FBC=\active \def^^^^1fbc{^^^^e0f8}
    % Alpha with iota -> Alpha with iota under

and similarly for the others. Note that this version has just a single
set of braces (since it requires no font-switching), and its expansion
should not interfere with kerning, so that would seem to make it preferable.

The "capital greek with iota underneath" alternates seem to run from
E0E0 to E0FA. This doesn't include the "capital Rho with alternate
breathing", which is at a different codepoint. So, you could write
yourself a quick tex document such as:

  \font\minion="Minion Pro" at 14pt
  \minion
  \halign{#\hfil&\quad#\hfil\cr
    E0E0:&\char"E0E0\cr
    E0E1:&\char"E0E1\cr
    % ...
  } \end

for handy reference. Or, just use a font editor, if you have one (I use
"fontforge" on Linux). Adam suggested the FontLab Studio demo.

-- 
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/


More information about the XeTeX mailing list