10

Using the sans serif font Linux Biolinum, I set the Numbers option to Lining, in order to use normal numbers. This gives the following warning message (twice):

*************************************************
* fontspec warning: "icu-feature-not-exist-in-font"
* 
* OpenType feature 'Numbers=Lining' (+lnum) not available for font 'Linux
* Biolinum O/B' with script 'Latin' and language 'Default'.
*************************************************

The output nevertheless correctly prints normal lining numbers. What's going on here? Below a MWE with output.

\documentclass{article}
\usepackage{fontspec}
\setsansfont[Numbers = Lining]{Linux Biolinum O}

\begin{document}
Numbers: \textsf{0123456789}
\end{document}

enter image description here

Sverre
  • 20,729

3 Answers3

10

this works for me:

\documentclass{article}
\usepackage{fontspec}
\setmainfont[RawFeature=+onum]{Linux Libertine O}
\setsansfont[RawFeature=+lnum]{Linux Biolinum O}

\begin{document}
0123456789
Numbers: \textsf{0123456789}
\end{document}

enter image description here

  • According to the documentation of fontspec the option Numbers=Lining should set the font feature lnum, shouldn't it? And since this feature exists in Linux Biolinum O the warning is at least misleading. – cgnieder Dec 16 '12 at 16:26
  • I want to set it because I normally use Numbers = OldStyle, so I want to see when I use lining numbers instead.

    That said - I have a suspicion that RawFeature=+lnum is ignored. I first copied your initial reply with the typo RawFeature=+lum, and it compiled without warnings, and printed lining numbers.

    – Sverre Dec 16 '12 at 16:26
  • @cgnieder: I agree. The font clearly has lining numbers, so I'm puzzled why fontspec gives me this warning. It gives me no warning if I set Numbers = OldStyle. – Sverre Dec 16 '12 at 16:28
  • @Sverre:ok, understood. I edited my example which works for oldstyle and lining numbers –  Dec 16 '12 at 16:32
  • @cgnieder: it maybe a problem with the script and language setting inside Biolinum –  Dec 16 '12 at 16:38
  • 1
    @Herbert I wonder if one should report this to the font developers? (I'm tempted to do so.) – cgnieder Dec 17 '12 at 22:41
1

I had this exact problem with another font. I think it's a problem with the way the font is set up, rather than a problem with Fontspec.

I think what's happening is: Fontspec tries to enable a feature that hasn't been correctly tagged in the font, so it fails and goes back to the default configuration, printing uppercase numbers as desired.

To test this hypothesis, I tried a version of the above answer, essentially reversing the enabling of old style figures: \addfontfeature{RawFeature=-onum}

This works perfectly fine and avoids warnings.

Josh
  • 23
0

The bold variant of Linux Biolinum doesn't have the lnum feature (but does have lining numbers). This may explain why the warning is produced.

user22108
  • 606
  • So does the 'B' in 'Linux Biolinum O/B' in the warning message stand for 'bold' then? I'm still somewhat puzzled what it means to not have the lnum feature, but nevertheless have lining numbers, but this might be a font specific thing I have no knowledge of. – Sverre Dec 18 '12 at 17:49