Thursday, June 21. 2007
Opentype Fonts with Latex using xetex
With xetex you can easily use Opentype fonts in latex. There is no need for any conversion or anything, xetex can use any of the fonts you installed on your system (works fine unter linux) even if its opentype fonts that are not postscript, but truetype flavored.
Unter Gentoo Linux you just install app-text/xetex (additionally to tetex) and thats it!
% Load fontspec package to easily use fonts
\usepackage{fontspec}
% set fonts
\fontspec[BoldFont={Textra LT Com}, BoldFeatures={Weight=1.4}]{Textra LT Com}
\setromanfont{Textra LT Com}
%\setsansfont{Textra LT Com}
%\setmonofont{Textra LT Com}
Inserting this makes the default font "Textra LT Com" (you can find out this name with fc-list).
Then you can run xelatex (i.e. "xelatex myfile" if your tex file is called myfile.tex) on the File and it will result in a pdf nicely formatted using your font.
[Update 2007-06-21]:
If you upgraded freetype to Version >2.1.10-r3 (media-libs/freetype-2.1.10-r3) this might break the opentype/xetex support. So just downgrade to 2.1.10-r3 and everything should be fine again.
[Update 2007-07-23]: Make sure you also mask freetype packages > this Version, else the next upgrade will break it againemerge -av =media-libs/freetype-2.1.10-r3
grep freetype /etc/portage/package.mask >media-libs/freetype-2.1.10-r3
Opentype Fonts with Latex using xetex Posted by Christoph Hermann
in Stuff at
18:51
Comments (0) Trackbacks (353)
Comments (0) Trackbacks (353)