2

I migrated my XeTeX PDF generation from a Debian 9 system to the CentOS 7. The Red Hat packages of XeTeX where totally outdated and I had to remove them all, in order to install the latest TeX Live version.

After the installation I have added the TeX Live fonts to the operating system configuration:

# cp $(kpsewhich -var-value TEXMFSYSVAR)/fonts/conf/texlive-fontconfig.conf /etc/fonts/conf.d/09-texlive.conf
# fc-cache -fsv

And the CMU Sans Serif Bold font is known by fontconfig:

$ fc-list |grep CMU | grep Sans | grep Bold | grep -v Extended
/usr/local/texlive/2019/texmf-dist/fonts/opentype/public/cm-unicode/cmunso.otf: CMU Sans Serif:style=BoldOblique
/usr/local/texlive/2019/texmf-dist/fonts/opentype/public/cm-unicode/cmunsx.otf: CMU Sans Serif:style=Bold

On my Debian system I used the bold font in this way:

\font\tenbf="CMU Sans Serif/B" at 14pt

This has been recommended in this answer.

But this does not work any more on the new system. And I do not get any error. The definition gets silently ignored. And instead of the bold font I get the normal font.

But when I specify the correct name of the font file, it get the correct bold font:

\font\tenbf="[cmunsx]" at 14pt

How can I find out, why the font selection does not work, if I use the name of the font instead of the name of the file?

Update

I tried to follow Ulrike's comment, but I still do not see the error.

This is my test file bf.tex:

\XeTeXtracingfonts=1
\font\tenrm="CMU Sans Serif"
\tenrm RM
\font\tenbf="CMU Sans Serif/B"
\tenbf BF
\bye

This is the output of xetex:

$ xetex --no-pdf bf.tex
This is XeTeX, Version 3.14159265-2.6-0.999991 (TeX Live 2019) (preloaded format=xetex)
 restricted \write18 enabled.
entering extended mode
(./bf.tex [1] )
(see the transcript file for additional information)
Output written on bf.xdv (1 page, 452 bytes).
Transcript written on bf.log.

This is the log:

This is XeTeX, Version 3.14159265-2.6-0.999991 (TeX Live 2019) (preloaded format=xetex 2019.7.4)  5 JUL 2019 09:39
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**bf.tex
(./bf.tex
Requested font "CMU Sans Serif" scaled 1000
 -> /usr/local/texlive/2019/texmf-dist/fonts/opentype/public/cm-unicode/cmunss.
otf
Requested font "CMU Sans Serif/B" scaled 1000
 -> /usr/local/texlive/2019/texmf-dist/fonts/opentype/public/cm-unicode/cmunss.
otf
 [1] )
Output written on bf.xdv (1 page, 452 bytes).

This is the output of xdvipdfmx:

$ xdvipdfmx -vv bf.xdv
<FONTMAP:/usr/local/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map><FONTMAP:/usr/local/texlive/2019/texmf-var/fonts/map/dvipdfmx/updmap/kanjix.map><FONTMAP:/usr/local/texlive/2019/texmf-dist/fonts/map/dvipdfmx/ckx.map>bf.xdv -> bf.pdf
DVI Comment:  XeTeX output 2019.07.05:0939
<AGL:texglyphlist.txt><AGL:pdfglyphlist.txt><AGL:glyphlist.txt>[1</usr/local/texlive/2019/texmf-dist/fonts/opentype/public/cm-unicode/cmunss.otf@9.96pt<NATIVE-FONTMAP:/usr/local/texlive/2019/texmf-dist/fonts/opentype/public/cm-unicode/cmunss.otf/0/H/65536/0/0>
fontmap: /usr/local/texlive/2019/texmf-dist/fonts/opentype/public/cm-unicode/cmunss.otf/0/H/65536/0/0 -> /usr/local/texlive/2019/texmf-dist/fonts/opentype/public/cm-unicode/cmunss.otf(Identity-H)

pdf_font>> Input encoding "Identity-H" requires at least 2 bytes.
pdf_font>> The -m <00> option will be assumed for "/usr/local/texlive/2019/texmf-dist/fonts/opentype/public/cm-unicode/cmunss.otf".
(CID:CMUSansSerif)
pdf_font>> Type0 font "/usr/local/texlive/2019/texmf-dist/fonts/opentype/public/cm-unicode/cmunss.otf" cmap_id=<Identity-H,0> opened at font_id=</usr/local/texlive/2019/texmf-dist/fonts/opentype/public/cm-unicode/cmunss.otf/0/H/65536/0/0,0>.
>]
otf_cmap>> Creating ToUnicode CMap for "/usr/local/texlive/2019/texmf-dist/fonts/opentype/public/cm-unicode/cmunss.otf"...
(CID:/usr/local/texlive/2019/texmf-dist/fonts/opentype/public/cm-unicode/cmunss.otf[VSJZVN+CMUSansSerif][CIDFontType0][6 glyphs][753 bytes])
Compression saved 465 bytes
2360 bytes written

I can see that in both cases the same font file is used. But I still do not understand why.

  • 3
    Add \XeTeXtracingfonts=1 and compile with xetex --no-pdf file and then xdvipdfmx -vv file to get more info. – Ulrike Fischer Jul 4 '19 at 16:30
1

I was able to fix the problem by specifying the file name of the font.

\font\bf="[cmunsx]" at 14pt
\font\rm="[cmunss]" at 11pt
\font\tt="[cmuntt]" at 11pt
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.