[XeTeX] ".ttf" automatically added to font names

Ulrike Fischer news3 at nililand.de
Fri May 12 15:01:59 CEST 2017


Am Fri, 12 May 2017 11:29:20 +0200 schrieb Dirk Hünniger:

> Hello,
> my name is Dirk Hünniger. Since approx 10 years I am working on 
> mediawiki2latex a pdf and latex export tool for mediawiki. I am 
> currently using Ubuntu 17.04 and observe a behavior of the \setmainfont 
> command that I don't understand. The string ".ttf" seems to be added 
> magically, which causes problems for me.
> 
> Everything works fine if I write it like this:
> 
> \setmainfont[Path=/usr/share/fonts/truetype/cmu/,UprightFont=cmunrm,BoldFont=cmunbx,ItalicFont=cmunti,BoldItalicFont=cmunbi]{cmunti}
> 
> I am using
> 
> This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016/Debian) 
> (preloaded format=xelatex)
>   restricted \write18 enabled.
> 
> In an older version of xetex I had to write it like this.
> 
> \setmainfont[Path=/usr/share/fonts/truetype/cmu/,UprightFont=cmunrm.ttf,BoldFont=cmunbx.ttf,ItalicFont=cmunti.ttf,BoldItalicFont=cmunbi.ttf]{cmunrm.ttf}
> 
> If I do this now I get the following error:
> 
>> kpathsea:make_tex: Invalid fontname 
>> `[/usr/share/fonts/truetype/cmu/cmunrm.ttf.ttf]/OT', contains '['


> So the string .ttf is automatically added which causes the problem. The 
> problem gets serious If I want to uses east-asian fonts like

In my texlive 2016 (in windows) the fonts are otf and not ttf-font,
so using ttf as extension leads to errors. 

Beside this I get the error if I use the UprightFont-key, which
looks a bit senseless anyway. 

This works without problems:

\setmainfont{cmunrm.otf}[BoldFont=cmunbx.otf,ItalicFont=cmunti.otf,BoldItalicFont=cmunbi.otf]


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/



More information about the XeTeX mailing list