13

I've installed texlive 2022 pretest and play around with it.

I've found a font called Recursive, see here: https://fonts.google.com/specimen/Recursive#about and the website here: https://www.recursive.design/ . According to the manual here https://www.recursive.design/assets/arrowtype-recursive-sansmono-specimen.pdf there are multiple axes.

I've found this explanation how to use axes of font features, see https://tex.stackexchange.com/a/591485/4736 .

But I fail to get italic axis working.

The above mentioned font comes with a variable font file, called Recursive-VariableFont_CASL,CRSV,MONO,slnt,wght.ttf, which I renamed to Recursive-VariableFont.ttf.

I fail to find any documentation about +axis=. Where is this documented? I'm using fontspec v2.8a.

What I've tried so far:

\documentclass[a4paper,12pt]{article}
\usepackage{fontspec}
\defaultfontfeatures{%
   RawFeature={+axis={CRSV}}%, slnt, CASL, wght}},
   % RawFeature={+axis={wght=100}},
   % RawFeature={+axis={mono=0}},
   % RawFeature={+axis={slnt=0}},
   % RawFeature={+axis={CASL=0}},
}
\setmainfont[
   ItalicFont=Recursive-VariableFont.ttf,
   BoldFont=Recursive-VariableFont.ttf,
   BoldItalicFont=Recursive-VariableFont.ttf,
    BoldFeatures={RawFeature={+axis={wght=500}}},
    BoldItalicFeatures={RawFeature={+axis={wght=900}}},
    ItalicFeatures = {RawFeature={+axis={CRSV=1}}}
    ]{Recursive-VariableFont.ttf}

    \setmonofont{Recursive-VariableFont.ttf}[%
    RawFeature={+axis={mono=1}}]


    
\begin{document}
\par the quick brown fox jumps over the lazy dog.
\par\textit{the quick brown fox jumps over the lazy dog.}
\par\textbf{the quick brown fox jumps over the lazy dog.}
\par\textbf{\textit{the quick brown fox jumps over the lazy dog.}}

\texttt{Es irrt der Mensch..}

\end{document}
% Local Variables:
% TeX-engine: luatex
% End:

The output:

Running `LaTeX' on `variable-recursive' with ``lualatex --jobname=variable-recursive  -file-line-error   --synctex=1 -interaction=nonstopmode variable-recursive.tex''
This is LuaHBTeX, Version 1.15.0 (TeX Live 2022) 
 restricted system commands enabled.
(./variable-recursive.tex
LaTeX2e <2021-11-15> patch level 1
 L3 programming layer <2022-02-24>
(/local/texlive/2022/texmf-dist/tex/latex/base/article.cls
Document Class: article 2021/10/04 v1.4n Standard LaTeX document class
(/local/texlive/2022/texmf-dist/tex/latex/base/size12.clo))
(/local/texlive/2022/texmf-dist/tex/latex/fontspec/fontspec.sty
(/local/texlive/2022/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
(/local/texlive/2022/texmf-dist/tex/latex/l3kernel/expl3.sty
(/local/texlive/2022/texmf-dist/tex/latex/l3backend/l3backend-luatex.def)))
(/local/texlive/2022/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
(/local/texlive/2022/texmf-dist/tex/latex/base/fontenc.sty)
(/local/texlive/2022/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
(./variable-recursive.aux)
(/local/texlive/2022/texmf-dist/tex/latex/base/ts1cmr.fd) [1{/local/texlive/2022/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./variable-recursive.aux))
 406 words of node memory still in use:
   3 hlist, 1 vlist, 1 rule, 2 glue, 3 kern, 1 glyph, 4 attribute, 48 glue_spec, 4 attribute_list, 1 write nodes
   avail lists: 2:49,3:12,4:1,5:96,6:10,7:460,9:34
</home/AW/.fonts/r/Recursive-VariableFont.ttf></home/AW/.fonts/r/Recursive-VariableFont.ttf></home/AW/.fonts/r/Recursive-VariableFont.ttf></home/AW/.fonts/r/R
ecursive-VariableFont.ttf></home/AW/.fonts/r/Recursive-VariableFont.ttf>
Output written on variable-recursive.pdf (1 page, 41296 bytes).
SyncTeX written on variable-recursive.synctex.gz.
Transcript written on variable-recursive.log.

TeX Output finished at Tue Mar  1 18:03:24

But no italic letters in the pdf:

no  italic letters

Any ideas?

6
  • Where the file Recursive-VariableFont.ttf can be found? I tried Get Recursive button at recursive.design but the downloaded zip file includes only fixed instances of the font.
    – wipet
    Mar 2, 2022 at 12:39
  • @wipet Version with possible error might be from Google, see address in my post.
    – Keks Dose
    Mar 2, 2022 at 12:41
  • Address in your post is recursive.design , the blue button Get recursive is here, the Download is possible after the button is used. The file ArrowType-Recursive-1.078.zip is downloaded but there are only fixed instances of the font, no Recursive-VariableFont.ttf.
    – wipet
    Mar 2, 2022 at 12:53
  • @wipet Look again...
    – Keks Dose
    Mar 2, 2022 at 12:54
  • I did look again but no file Recursive-VariableFont.ttf. Please, help me more. I described exactly what I did do without success. Please, be similar exact.
    – wipet
    Mar 2, 2022 at 12:56

1 Answer 1

14

The axis feature is documented in the luaotfload manual. Mostly this was already present in TeX Live 2021, but there it only worked with the node shaper and not the HarfBuzz based harf shaper. In TeX Live 2022 we extended it to also work with HarfBuzz. As you noticed the node implementation doesn't like uppercase axis names, but you can work around that in TL 2022 by switching to HarfBuzz:

\documentclass[a4paper,12pt]{article}
\usepackage{fontspec}

\setmainfont[
   Renderer=HarfBuzz,
   ItalicFont=Recursive-VariableFont.ttf,
   BoldFont=Recursive-VariableFont.ttf,
   BoldItalicFont=Recursive-VariableFont.ttf,
    BoldFeatures={RawFeature={+axis={wght=500}}},
    BoldItalicFeatures={RawFeature={+axis={wght=900}}},
    ItalicFeatures = {RawFeature={+axis={CRSV=1}}}
    ]{Recursive-VariableFont.ttf}

    \setmonofont{Recursive-VariableFont.ttf}[%
    Renderer=HarfBuzz,
    RawFeature={+axis={MONO=1}}]


    
\begin{document}
\par the quick brown fox jumps over the lazy dog.
\par\textit{the quick brown fox jumps over the lazy dog.}
\par\textbf{the quick brown fox jumps over the lazy dog.}
\par\textbf{\textit{the quick brown fox jumps over the lazy dog.}}

\texttt{Es irrt der Mensch..}

\end{document}

enter image description here

7
  • 1
    Such fun! I'll try to knock something up with all these axes! Thank you!
    – Keks Dose
    Mar 1, 2022 at 17:50
  • 2
    @KeksDose I hid it a bit in the edit, but take care that the axis names (especially in harf mode) are case sensitive. E.g. you need MONO, not mono. Mar 1, 2022 at 17:59
  • 1
    The bold italic doesn't work, as you can see if you compare the letter v, e.g. BoldItalicFeatures={RawFeature={+axis={wght=600},+axis={CRSV=1}}}, don't improve the output. Probably I've got to read the luaotfload manual.
    – Keks Dose
    Mar 1, 2022 at 18:50
  • 1
    You can only have a single axis feature, but it can set multiple values. So you would use e.g. RawFeature={axis={wght=600,CRSV=1}}. Mar 1, 2022 at 19:01
  • 1
    Output is right, but I get a very strange error. BoldItalicFeatures={RawFeature={+axis={wght=600,CRSV=1}}},, error: </home/AW/.fonts/r/Recursive-VariableFont.ttf></home/AW/.fonts/r/Recursive-VariableFont.ttf...mf-dist/tex/luatex/luaotfload/luaotfload-harf-define.lua:545: at tempt to index a nil value (local 'extents'). <*> variable-recursive.tex ...mf-dist/tex/luatex/luaotfload/luaotfload-harf-define.lua:545: attempt to index a nil value (local 'extents'). <*> variable-recursive.tex
    – Keks Dose
    Mar 1, 2022 at 19:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .