[XeTeX] fontspec: Unknown feature `' in font `TeX Gyre Heros'.
Ross Moore
ross.moore at mq.edu.au
Fri Dec 24 00:46:25 CET 2010
Hi Martin,
On 23/12/2010, at 8:39 PM, Martin Schröder wrote:
> Here's my minimal input:
>
> \listfiles
> \documentclass{article}
> \usepackage[ngerman,english]{babel}
On seeing this, my first inclination was that babel is
redundant with XeTeX, and maybe was changing a catcode,
or something like that.
But testing with and without showed no difference.
Then I remembered that some messages are written to the .log file,
but *not* to the console. Checking for this, I found that yes I *do*
see the messages that you reported.
viz.
>>> \g_fontspec_family_TeX Gyre Heros_int=\count171
>>> fontspec info: Defining font family 'TeXGyreHeros(0)' for font 'TeX Gyre Heros
>>> ' with options [Ligatures=TeX].
>>>
>>> \g_fontspec_TeXGyreHeros(0)_prop=\toks39
>>> fontspec info: Defining shape 'normal' with NFSS spec.:
>>> (fontspec) <->"TeX Gyre Heros/ICU:script=latn;language=DFLT;mapping=tex-text;;
>>> "
>>>
>>> fontspec info: Defining shape 'small caps' with NFSS spec.:
>>> (fontspec) <->"TeX Gyre Heros/ICU:script=latn;language=DFLT;mapping=tex-text;;
>>> +smcp;"
>>>
>>> fontspec info: Defining shape 'bold' with NFSS spec.:
>>> (fontspec) <->"TeX Gyre Heros/B/ICU:script=latn;language=DFLT;mapping=tex-text
>>> ;;"
>>>
>>> fontspec info: Defining shape 'bold small caps' with NFSS spec.:
>>> (fontspec) <->"TeX Gyre Heros/B/ICU:script=latn;language=DFLT;mapping=tex-text
>>> ;;+smcp;"
>>>
>>> fontspec info: Defining shape 'italic' with NFSS spec.:
>>> (fontspec) <->"TeX Gyre Heros/I/ICU:script=latn;language=DFLT;mapping=tex-text
>>> ;;"
>>>
>>> fontspec info: Defining shape 'italic small caps' with NFSS spec.:
>>> (fontspec) <->"TeX Gyre Heros/I/ICU:script=latn;language=DFLT;mapping=tex-text
>>> ;;+smcp;"
>>>
>>> fontspec info: Defining shape 'bold italic' with NFSS spec.:
>>> (fontspec) <->"TeX Gyre Heros/BI/ICU:script=latn;language=DFLT;mapping=tex-tex
>>> t;;"
>>>
>>> fontspec info: Defining shape 'bold italic small caps' with NFSS spec.:
>>> (fontspec) <->"TeX Gyre Heros/BI/ICU:script=latn;language=DFLT;mapping=tex-tex
>>> t;;+smcp;"
>>>
>>> Unknown feature `' in font `TeX Gyre Heros'.
>>> fontspec info: Font Lucida Grande does not contain any OpenType `Script' infor
>>> mation.
>>>
>>> \g_fontspec_family_Lucida Grande_int=\count172
>>> fontspec info: Defining font family 'LucidaGrande(0)' for font 'Lucida Grande'
>>> with options [Ligatures=TeX].
>>>
>>> \g_fontspec_LucidaGrande(0)_prop=\toks40
>>> fontspec info: Defining shape 'normal' with NFSS spec.:
>>> (fontspec) <->"Lucida Grande/AAT:mapping=tex-text;;"
>>>
>>> fontspec info: Defining shape 'bold' with NFSS spec.:
>>> (fontspec) <->"Lucida Grande/B/AAT:mapping=tex-text;;"
>>>
>>> fontspec info: Could not resolve font Lucida Grande/I (it probably doesn't exi
>>> st).
>>>
>>> fontspec info: Defining shape 'bold italic' with NFSS spec.:
>>> (fontspec) <->"Lucida Grande/BI/AAT:mapping=tex-text;;"
>>>
>>> Unknown feature `' in font `Lucida Grande'.
>>>
I have an extra \setmainfont[Ligatures=TeX]{Lucida Grande}
to see whether there is dependence upon the font itself.
Apparently not.
However, if there are no options
\setmainfont{TeX Gyre Heros}
then there is no extra empty entry as ;; .
Hence also no "Unknown feature `' " message.
So yes, this is surely due to the coding in fontspec.sty
creating that extra blank entry when processing options.
Or it comes from other (LaTeX 3 ?) coding that fontspec just
uses, without later eliminating the redundant entry.
Thus it is slightly inefficient coding that does no real harm.
Here it is explicitly:
fontspec defines:
>> \cs_new:Nn \fontspec_update_featstr:n {
>> \bool_if:NF \l_fontspec_firsttime_bool {
>> \sclist_gput_right:Nx \l_fontspec_rawfeatures_sclist {#1;}
>> }
>> }
appending a ';' character following the option string.
But there is already a ';' appended in:
>> \sclist_gput_right:Nn #1#2->\tl_gput_right:Nn #1{#2;}
so we end up with:
>> \tl_gput_right:Nn #1#2->\cs_gset_nopar:Npx #1{\exp_not:V #1\exp_not:n {#2}}
>> #1<-\l_fontspec_rawfeatures_sclist
>> #2<-mapping=tex-text;;
which now has the ';;' .
> \usepackage{fontspec}
> \setmainfont[Ligatures=TeX]{TeX Gyre Heros}
> \setsansfont[Ligatures=TeX]{TeX Gyre Heros}
> \begin{document}
> A
> \end{document}
> Best
> Martin
Hope this helps,
and sorry for the earlier inaccurate noise,
Ross
------------------------------------------------------------------------
Ross Moore ross.moore at mq.edu.au
Mathematics Department office: E7A-419
Macquarie University tel: +61 (0)2 9850 8955
Sydney, Australia 2109 fax: +61 (0)2 9850 8114
------------------------------------------------------------------------
More information about the XeTeX
mailing list