[XeTeX] font selection debugging

Vladimir Volovich vvv at vsu.ru
Thu Jul 24 14:03:12 CEST 2008


"WR" == Will Robertson writes:

 >> are those which prodiced the \font with name "ArTarumianGrqiNor_U
 >> BoldItalic/I/ICU"

 WR> If you don't explicitly set the BoldItalic font, it tries to
 WR> guess. And it uses the Bold font to base its guess around. So when
 WR> you say "BoldFont=ArTarumianGrqiNor_U BoldItalic", the reasonable
 WR> guess for BoldItalic is "ArTarumianGrqiNor_U BoldItalic/I".

yes, this is reasonable.

however, here is what produces wrong result (on one of computers), and
it may be a fontspec bug (or may not). since you know inner-workings of
fontspec by heart, it might be clear for you what's going on.

here's a test document:

\documentclass{article}
\usepackage{fontspec}
%\setmainfont[SmallCapsFont=ArTarumianGrqiNor_U]{ArTarumianGrqiBardzr_U} % works
%\setmainfont[SmallCapsFont=ArTarumianGrqiNor_U,ItalicFont=FMBF Notr]{ArTarumianGrqiBardzr_U} % works
\setmainfont[SmallCapsFont=ArTarumianGrqiNor_U,BoldFont=ArTarumianGrqiNor_U BoldItalic,ItalicFont=FMBF Notr]{ArTarumianGrqiBardzr_U} % doesn't work
\begin{document}

test \textsc{test}

\end{document}

it contains 3 \setmainfont commands. when i use the first two, i get
correct fonts in the pdf file -- pdffonts reports

name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
WMEWWR+ArTarumianGrqiBardzr_U-Italic CID TrueType      yes yes yes      5  0
WSCYGS+ArTarumianGrqiNor_U           CID TrueType      yes yes yes      7  0

i.e. main font is ArTarumianGrqiBardzr_U-Italic (that's its internal
name), and text produced by \textsc is ArTarumianGrqiNor_U as requested.

But, when i use the 3rd variant, i get wrong smallcaps font:

name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
RZAGEB+ArTarumianGrqiBardzr_U-Italic CID TrueType      yes yes yes      5  0
SQHBWK+ArTarumianGrqiNor_U-BoldItalic CID TrueType      yes yes yes      7  0

and as you can see it is triggered by adding BoldFont=ArTarumianGrqiNor_U BoldItalic.
which seems weird and unrelated.

in any case, i requested ArTarumianGrqiNor_U to be the smallcaps font,
not ArTarumianGrqiNor_U-BoldItalic, and this behavior looks wrong.

could you see what's going on? it is probably related to this weird
underlying problem i described:

 >> * why the results of \font\x="ArTarumianGrqiNor_U BoldItalic/I/ICU"
 >>   are different on two PCs

 WR> This one I can't help you with :)

because the PC where i see wrong smallcaps font has this line in the log:

Package fontspec Info: Could not resolve font ArTarumianGrqiNor_U BoldItalic/I (it might not exist) on input line 6.

unlike the other PC where the font is correct.

Best,
v.


More information about the XeTeX mailing list