[XeTeX] How to specify Fontin Sans (has underscore in file names) with Fontspec?
Joel C. Salomon
joelcsalomon at gmail.com
Wed Aug 18 22:17:55 CEST 2010
On 08/18/2010 02:55 PM, Philip Taylor (Webmaster, Ret'd) wrote:
> Joel C. Salomon wrote:
>> Trouble with that is that
>> the file names have underscores, and the naïve invocation
>> \setsansfont[
>> UprightFont = Fontin_Sans_R_45b,
>> BoldFont = Fontin_Sans_B_45b,
>> ItalicFont = Fontin_Sans_I_45b,
>> BoldItalicFont = Fontin_Sans_BI_45b,
>> SmallCapsFont = Fontin_Sans_SC_45b,
>> Ligatures = TeX
>> ]{Fontin Sans}
>> fails miserably.
>
> Hmmm , that is interesting. I don't have the font, but
> looking at the log in the absence of the font, it doesn't
> look as if the underscores are causing problems :
<snip minimal example>
> (e:/TeX/Live/2010/texmf-dist/tex/latex/fontspec/fontspec.cfg))
> kpathsea: Running mktextfm Fontin_Sans_R_45b
<snip>
> ! Font \zf at basefont=Fontin_Sans_R_45b at 10.0pt not loadable: Metric
> (TFM) file
> or installed font not found.
> <to be read again>
> \let
> l.11 ^^I^^I]{Fontin Sans}
>
> ? ^Z
OK, now I’m confused about where the error is coming from. I tried it
myself, also adding the .otf extension for some runs, both with XɘTeX &
LuaTeX, and always get a similar error.
On 08/18/2010 02:41 PM, Khaled Hosny wrote:
> Not a real answer, but can't you use font names instead of file names
Actually this is a real answer; my reading of the fontspec manual
suggested that the [<style>Font = <whatever>] options needed file names
rather than font names. Turns out, not so much:
\documentclass {minimal}
\usepackage {fontspec}
\setmainfont[
BoldFont = * Bold,
ItalicFont = * Italic,
BoldItalicFont = * Bold Italic,
SmallCapsFont = * Small Caps,
Ligatures = TeX
]{Fontin Sans}
\begin {document}
foo \textit{foo \textbf{bar};} \textbf{bas} \textsc{quux}
\end {document}
This works just fine.
Thanks,
—Joel
More information about the XeTeX
mailing list