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 '['
kpathsea:make_tex: Invalid fontname
`[/usr/share/fonts/truetype/cmu/cmuntt.ttf.ttf]/OT', contains '['
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "cmuntt.ttf" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.24 ...ttf,BoldItalicFont=cmuntx.ttf]{cmunbx.ttf}
So the string .ttf is automatically added which causes the problem. The
problem gets serious If I want to uses east-asian fonts like
/usr/share/fonts/truetype/wqy/wqy-zenhei.ttc
which does not end on ttf. So I propose to revert this change so that
the file extension .ttf is not automatically added and thus has to be
written out by the user of xetex.
Yours Dirk Hünniger
--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex