[XeTeX] Re: XeTeX Question Too Stupid for XeTeX List
Bruno Voisin
bvoisin at mac.com
Fri Sep 24 09:22:07 CEST 2004
Hi Bob,
Sorry for not answering your previous messages, but I'm terribly busy,
and every time I am already spending on the XeTeX or OS X TeX list is
time that I shouldn't.
> In LaTeX, I use these packages to get palatino (rm), courior (tt), and
> helvet (sf).
> \usepackage{palatino}
> \usepackage{courier}
> \usepackage{helvet}
>
> How do you do that in XeTeX or XeLaTeX?
I think you just don't. (BTW, your question is no stupid at all, that's
one many users of XeTeX, included me, must have asked, or will ask, to
themselves at some point.) Hence I am cc'ing the list.
These packages rely on the fonts to be available in .pfb format, that
XeTeX can't use. For XeTeX to see the fonts, you would need to convert
them to .otf format, and use Apple's font tools to add POST tables to
them, and possibly do more. Jonathan did that for the CM and a couple
of other fonts, now in
/usr/local/teTeX/share/texmf.local/fonts/otf/xetex/; that's why you can
use them in XeTeX. However, Jonathan did the conversion with the
commercial FontLab, and writing equivalent scripts for the free
FontForge is something that Jonathan (I hope I'm summarizing correctly
his messages) hasn't had the time to experiment with yet. Plus there is
likely to be licensing issues for some fonts --- for example, Apple's
license can be interpreted as prohibiting the conversion of the fonts
coming with OS X --- but IANAL. (What I can only say is that the
OpenOffice.org installer converts the OS X fonts to .ttf format for OOo
use, so I assume the OOo guys know what they're doing.)
> Pretty dumb question, but I've looked at the examples and don't really
> "get it". It all looks very complicated.
What you can do is recreate the same kind of stuff that the above
packages do with the Palatino, Courier and Helvetica .pfb fonts for OS
X fonts directly.
Something like:
\DeclareFontFamily{U}{osxppl}{}
\DeclareFontShape{U}{osxppl}{m}{n}
{<-> "Palatino"}{}
\DeclareFontShape{U}{osxppl}{m}{it}
{<-> "Palatino\space Italic"}{}
\DeclareFontShape{U}{osxppl}{b}{n}
{<-> "Palatino\space Bold"}{}
\DeclareFontShape{U}{osxppl}{b}{it}
{<-> "Palatino\space Bold\space Italic"}{}
\DeclareFontShape{U}{osxppl}{bx}{n}
{<-> ssub * osxppl/b/n}{}
\DeclareFontShape{U}{osxppl}{bx}{it}
{<-> ssub * osxppl/b/it}{}
\DeclareFontShape{U}{osxppl}{m}{sl}
{<-> ssub * osxppl/m/it}{}
\DeclareFontShape{U}{osxppl}{b}{sl}
{<-> ssub * osxppl/b/it}{}
\DeclareFontShape{U}{osxppl}{bx}{sl}
{<-> ssub * osxppl/bx/it}{}
\DeclareFontFamily{U}{osxphv}{}
\DeclareFontShape{U}{osxphv}{m}{n}
{<-> s* [0.95] "Helvetica"}{}
\DeclareFontShape{U}{osxphv}{b}{n}
{<-> s* [0.95] "Helvetica\space Bold"}
\DeclareFontShape{U}{osxphv}{bx}{n}
{<-> ssub * osxphvphv/b/n}{}
\DeclareFontFamily{U}{osxpcr}{}
\DeclareFontShape{U}{osxpcr}{m}{n}
{<-> "Courier"}{}
\DeclareFontShape{U}{osxpcr}{b}{n}
{<-> "Courier\space Bold"}{}
\DeclareFontShape{U}{osxpcr}{bx}{n}
{<-> ssub * osxpcr/b/n}{}
\renewcommand{\encodingdefault}{U}
\renewcommand{\rmdefault}{osxppl}
\renewcommand{\sfdefault}{osxphv}
\renewcommand{\ttdefault}{osxpcr}
Several concerns though:
- Palatino doesn't seem to be a part of OS X. On my PowerBook,
purchased in May 2003, it's located in the OS 9 font folder. So it's
possible you don't have it if your Mac is more recent.
- Helvetica and Courier seem to be only available in regular shape in
OS X, not oblique nor italic. Weird! In /Library/Fonts/ I have
Helvetica Neue which is available in many more series and shapes,
though I've no idea of how it got there.
- All this was written in a hurry, so beware of typos if you
cut-and-paste the above without precautions.
- The above only takes care of text fonts. Math fonts, should you need
them, will remain CM by default. You could get better matching weights
and shapes by using the belleek fonts, which I think are a free clone
of the commercial MathTime (having MathTime, I've never attempted yet
to use belleek), or even better mathpazo, or pxfonts or txfonts; they
are all installed in .otf form in the same time as XeTeX. Normally:
belleek: math fonts for Times
mathpazo: math fonts for Palatino
txfonts: alternative math fonts for Times
pxfonts: alternative math fonts for Palatino
For docs, see
/usr/local/teTeX/share/texmf.tetex/doc/latex/psnfss/psnfss2e.pdf and
the related folders inside
/usr/local/teTeX/share/texmf.tetex/doc/fonts/.
HTH,
Bruno
More information about the XeTeX
mailing list