[Tex/LaTex] \textlf{} for light font weight – how common

fontsfontspectext-decorationstypefaces

In the allrunes.sty documentation (which uses Metafont), I’ve recently seen the \textlf macro for the first time. It selects a light font and therefore accompanies the frequent command \textbf and its sibling \textmd for default ‘medium’.

Searching for ‘textlf’ on SX showed that this string is also a package option for Minion Pro, but there it switches on lining figures and it seems some other packages have a command \textlf that does the same.

  • So I wonder, how commonly supported is \textlf and is there an established alternative without conflicts?
  • More generally, if I’m using a typeface with fonts for many weights available (e.g. thin, light, semi-bold, bold, heavy, black …), how are they best accessed in Xe-/LuaTeX?

The second question is relevant, for instance, if I was to write a supporting package for an Open Type typeface that provided predefined \text… macros, which wrap fontspec’s \newfontfamily or rather the less known \newfontface within \DeclareTextFontCommand.

Best Answer

in a texlive 2014, updated this morning I get the following from grep (with my annotation in comment at the end of each line):

$ grep "[^a-z]textlf[^a-z]" */*
allrunes/allrunes.sty:\DeclareTextFontCommand{\textlf}{\lfseries}
baskervaldx/Baskervaldx.sty:\DeclareRobustCommand{\textlf}[1]{%    lining figures
fbb/fbb.sty:\DeclareRobustCommand{\textlf}[1]{%    lining figures
heuristica/heuristica.sty:\DeclareRobustCommand{\textlf}[1]{%    lining figures
typeface/typeface.sty:      \PassOptionsToPackage{textlf}{MinionPro}%    lining figures
xcharter/XCharter.sty:\def\textlf#1{{\lfstyle #1}}%    lining figures


$ pwd
/usr/local/texlive/2014/texmf-dist/tex/latex

So it seems that the convention is that \textlf where used in all other packages denotes lining figures.