11

Someone just suggested to me in the context of another question to consider one or two \fontfamily{...}\fontseries{...} combinations; but I'm not too keen on those options. How can I check all such combinations installed/available on my system?

Note: I'd be ok with doing this outside of LaTeX, e.g. from the shell or even using some TeX-distribution-specific mechanism (I use TeXLive) - if there's no better option.

8
  • With a lot work. Every font can have different valid combinations. Jul 7, 2017 at 12:42
  • 1
    You really can't. Apart from a small set of accepted conventions, such as n it sl sc m b bx, the code are essentially arbitrary. There are scores of \fontfamily designations.
    – egreg
    Jul 7, 2017 at 20:03
  • @egreg: See edit.
    – einpoklum
    Jul 7, 2017 at 21:05
  • 1
    @UlrikeFischer: But people package these fonts into the TeX distribution. Surely there's some catalog, some convention for filenames, whatever.
    – einpoklum
    Jul 7, 2017 at 21:06
  • 1
    @einpoklum You can see a typical .fd file in my answer. Good luck.
    – egreg
    Jul 7, 2017 at 21:33

4 Answers 4

12

Not all possible values, but you can get an overview about the most common options if mouse hovering the command in question in texstudio:

(this does not check if all the fonts are installed on your system and which of the weights they actually have)

enter image description here enter image description here

5
8

Font descriptions are usually kept in .fd files (but it's not mandatory, some packages may define the fonts directly in the .sty file).

The shell command

fd '^[tT]1.*\.fd$' /usr/local/texlive/2017/texmf-dist/tex/latex | wc -l

(fd is a script providing a simpler interface than find) returns 555.

So there are 555 font families supporting the T1 encoding (and 502 for the OT1 encoding, with a similar command line).

Now your task is to look inside each .fd file you're interested in and extract the information related to the shape and series provided in the font family. Just for example, T1Roboto-LF.fd contains

%% Generated by autoinst on 2015/09/15
%%
\ProvidesFile{T1Roboto-LF.fd}
    [2015/09/15 (autoinst)  Font definitions for T1/Roboto-LF.]

\expandafter\ifx\csname Roboto@scale\endcsname\relax
    \let\Roboto@@scale\@empty
\else
    \edef\Roboto@@scale{s*[\csname Roboto@scale\endcsname]}%
\fi

\DeclareFontFamily{T1}{Roboto-LF}{}

\DeclareFontShape{T1}{Roboto-LF}{l}{sc}{
      <-> \Roboto@@scale Roboto-Light-lf-sc-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{l}{n}{
      <-> \Roboto@@scale Roboto-Light-lf-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{l}{it}{
      <-> \Roboto@@scale Roboto-LightItalic-lf-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{l}{scit}{
      <-> \Roboto@@scale Roboto-LightItalic-lf-sc-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{l}{scsl}{
      <-> ssub * Roboto-LF/l/scit
}{}

\DeclareFontShape{T1}{Roboto-LF}{l}{sl}{
      <-> ssub * Roboto-LF/l/it
}{}

\DeclareFontShape{T1}{Roboto-LF}{k}{sc}{
      <-> \Roboto@@scale Roboto-Black-lf-sc-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{k}{n}{
      <-> \Roboto@@scale Roboto-Black-lf-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{k}{it}{
      <-> \Roboto@@scale Roboto-BlackItalic-lf-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{k}{scit}{
      <-> \Roboto@@scale Roboto-BlackItalic-lf-sc-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{k}{scsl}{
      <-> ssub * Roboto-LF/k/scit
}{}

\DeclareFontShape{T1}{Roboto-LF}{k}{sl}{
      <-> ssub * Roboto-LF/k/it
}{}

\DeclareFontShape{T1}{Roboto-LF}{b}{sc}{
      <-> \Roboto@@scale Roboto-Bold-lf-sc-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{b}{n}{
      <-> \Roboto@@scale Roboto-Bold-lf-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{b}{it}{
      <-> \Roboto@@scale Roboto-BoldItalic-lf-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{b}{scit}{
      <-> \Roboto@@scale Roboto-BoldItalic-lf-sc-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{b}{scsl}{
      <-> ssub * Roboto-LF/b/scit
}{}

\DeclareFontShape{T1}{Roboto-LF}{b}{sl}{
      <-> ssub * Roboto-LF/b/it
}{}

\DeclareFontShape{T1}{Roboto-LF}{mb}{sc}{
      <-> \Roboto@@scale Roboto-Medium-lf-sc-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{mb}{n}{
      <-> \Roboto@@scale Roboto-Medium-lf-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{mb}{it}{
      <-> \Roboto@@scale Roboto-MediumItalic-lf-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{mb}{scit}{
      <-> \Roboto@@scale Roboto-MediumItalic-lf-sc-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{mb}{scsl}{
      <-> ssub * Roboto-LF/mb/scit
}{}

\DeclareFontShape{T1}{Roboto-LF}{mb}{sl}{
      <-> ssub * Roboto-LF/mb/it
}{}

\DeclareFontShape{T1}{Roboto-LF}{m}{sc}{
      <-> \Roboto@@scale Roboto-Regular-lf-sc-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{m}{n}{
      <-> \Roboto@@scale Roboto-Regular-lf-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{m}{it}{
      <-> \Roboto@@scale Roboto-Italic-lf-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{m}{scit}{
      <-> \Roboto@@scale Roboto-Italic-lf-sc-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{m}{scsl}{
      <-> ssub * Roboto-LF/m/scit
}{}

\DeclareFontShape{T1}{Roboto-LF}{m}{sl}{
      <-> ssub * Roboto-LF/m/it
}{}

\DeclareFontShape{T1}{Roboto-LF}{t}{sc}{
      <-> \Roboto@@scale Roboto-Thin-lf-sc-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{t}{n}{
      <-> \Roboto@@scale Roboto-Thin-lf-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{t}{it}{
      <-> \Roboto@@scale Roboto-ThinItalic-lf-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{t}{scit}{
      <-> \Roboto@@scale Roboto-ThinItalic-lf-sc-t1
}{}

\DeclareFontShape{T1}{Roboto-LF}{t}{scsl}{
      <-> ssub * Roboto-LF/t/scit
}{}

\DeclareFontShape{T1}{Roboto-LF}{t}{sl}{
      <-> ssub * Roboto-LF/t/it
}{}

\DeclareFontShape{T1}{Roboto-LF}{bx}{sl}{
      <-> ssub * Roboto-LF/b/sl
}{}

\DeclareFontShape{T1}{Roboto-LF}{bx}{scsl}{
      <-> ssub * Roboto-LF/b/scsl
}{}

\DeclareFontShape{T1}{Roboto-LF}{bx}{sc}{
      <-> ssub * Roboto-LF/b/sc
}{}

\DeclareFontShape{T1}{Roboto-LF}{bx}{n}{
      <-> ssub * Roboto-LF/b/n
}{}

\DeclareFontShape{T1}{Roboto-LF}{bx}{it}{
      <-> ssub * Roboto-LF/b/it
}{}

\DeclareFontShape{T1}{Roboto-LF}{bx}{scit}{
      <-> ssub * Roboto-LF/b/scit
}{}

\endinput

which says the font provides the series

  • l (light)
  • k (black)
  • b (bold)
  • mb (medium bold)
  • m (medium or regular)
  • t (thin)

and defines bx as an alias for b.

The descriptors, apart from m and b are essentially arbitrary strings. The LaTeX Font Guide (texdoc fntguide) lists just a few “common” values. What a font package calls k might be very different from another one.

3

This website might help. Useful to check fonts available.

https://tug.org/FontCatalogue/

0

The list is bigger even that that. It is open-ended. The answer is x.

Now that xelatex and lualatex can access system fonts, not just tex/latex ones, the list has grown greatly.

Further,

Suppose I use the fontspec package and define a font family \setromanfont{Noto Serif}[ and then name one of its series 仢ul and assign an unrelated font face to that series, FontFace={仢ul}{n}{Font=SimSun}, and I do that multiple times,

and have \DeclareRobustCommand{\仢ulseries}{\fontseries{仢ul}\selectfont}

and

\DeclareTextFontCommand{\仢textul}{\仢ulseries}

and then call the series with

\仢textul{\sampletext} {\仢ulseries \sampletext}

where \sampletext is defined as

\newcommand\sampletext{了亶他件}

and I do that for as many series (and shapes) as I want or need,

then I get

myseries

The list would be limited by system constraints, though.

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