# lining vs oldstyle figures, with the Berenis font from Arkandis and fontaxes

I've just started trying to use the Berenis font with the fontaxes package and am getting the following warning messages:

Package fontaxes Warning: I don't know how to decode
(fontaxes)                figuresalt 2' on input line 8.

Package fontaxes Warning: I don't know how to decode
(fontaxes)                family ybd2' on input line 8.


Is this something I should be worrying about? or are there ways to get better compatibility between the two?

A MWE is as follows:

\documentclass{article}

\usepackage[lf]{berenis}
\usepackage{fontaxes}

\begin{document}

test \textfigures{1234} \liningfigures{1234} test

\end{document}


This appears to do the "right thing", but removing the [lf] option from the berenis package shows that it's not able to select lining figures appropriately.

I also see that it is unable to find LY1ybd2j-OsF.fd or LY1ybd2jj.fd when compiling. Should I worry about this?

The berenis package seems to include its own commands for selecting figure styles, I'd prefer not to use this as I have quite a bit of text already using fontaxes style commands.

Thanks!

– Fran
Nov 11 '13 at 13:12
• Yes, but I wasn't sure if it would interact with fontaxes in weird and wonderful ways. I guess I could test it and see what happens, but I was interested in whether it was because of a missed option or file somewhere. Having fontaxes nest font styles in a more intuitive manner is a nice thing to have. Nov 11 '13 at 14:04
• Please, save yourself a lot of trouble and use lualatex ore xelatex with fontspec instead of pdftex. Nov 11 '13 at 22:00
• @MartinSchröder, performance of those has been abysmal when I've tried to use them. Notably, beamer presentations and large (thesis length—50k word, lots of figures) documents. Also, they lag a long way behind with microtype which I like a lot. Nov 12 '13 at 11:47
• @SamMason: When did you try? Performance is not really a problem today and microtype works with LuaTeX. Nov 12 '13 at 12:57

berenisadf.sty loads nfssext-cfr.sty which is an extension of nfssext.sty, which is part of The Font Installation Guide. Basically, this requires fonts to be named in a particular way (according to the standard scheme developed by Karl Berry for TeX fonts).

fontaxes.sty requires that fonts be named in a particular way which does not conform to the standard naming scheme for TeX fonts. This is not a criticism. Using non-standard naming makes it much more obvious which features particular font variants have. ('Osf' is much more transparent than 'j'.) But it is non-standard in TeX terms.

Both packages provide access to font features such as different styles of numerals by defining commands which look like standard LaTeX font selection commands. But they are defined via macros only and so they depend on breaking up font names in particular ways. One package does this one way (for standardly named fonts) and the other does it another way (for non-standardly named fonts).

This is why the fonts are not being found. The commands you are using are asking for fonts which do not exist as far as pdflatex is concerned. .fd is a font definition file. It is how latex finds fonts. pdflatex is telling you it can't find the file which defines the fonts you've requested. Hence, it cannot find the fonts. When you pass the package the lf option, the font selection commands fail, but you still get lining figures because that's what you are using anyway. When you don't pass this option, you get the default figures which are not lining.

Both font selection commands fail in your example. I'm not currently sure why the first one appears to work because I'm not certain quite how the fontaxes package works. But if you look at the output, pdflatex definitely complains.

If you don't want to redo your text, I suggest trying something like this, although I am not guaranteeing this will work in all cases:

\documentclass{article}

\usepackage{berenis}
\DeclareTextFontCommand{\textfigures}{\ostyle}
\DeclareTextFontCommand{\liningfigures}{\lstyle}

\begin{document}

test \textfigures{1234} \liningfigures{1234} test

\end{document}


This should be less fragile than using \newcommand etc.