What will be the place of New Font Selection Scheme (NFSS) in LaTeX3?

NFSS is neither new nor answering to modern trends (I mean True and Open Type fonts). LaTeX3 team has already done huge work but it is facing even bigger work if we want keeping all LaTeX2e's stuff in LaTeX3. Isn't worthy to discuss wheather do we really want to keep Metafont fonts in LaTeX3?

UPDATE: Let me rephrase this question as requested by @Leo Liu and @ Mark S. Everitt: Is there any further plan about font scheme in LaTeX3? And what has been already done?

  • 3
    NFSS is not Metafont. It works fine with any font formats. Rather it is the way to map fonts onto the space family-series-shape-size. Think about it as a Periodic system of fonts. There are packages that provide additional axes, but the system itself is sound.
    – Boris
    Nov 25, 2011 at 6:35
  • 1
    In addition to Boris's point, I agree with Canageek that this looks rather discursive. I'll wait to see what others feel before posting an answer.
    – Joseph Wright
    Nov 25, 2011 at 6:50
  • 1
    I agree with Boris, I think it is not a real question. BTW, @Joseph, is there any further plan about font scheme in LaTeX3? Maybe this question can be modified to be a good one for LaTeX 3.
    – Leo Liu
    Nov 25, 2011 at 7:06
  • 1
    @LeoLiu We do have plans for LaTeX3, hence saying that I will post an answer if the question stays open.
    – Joseph Wright
    Nov 25, 2011 at 8:03
  • 1
    Perhaps if this can be rephrased into something more like "...what has been done?" or "How can I use..." it should stay here. If not, it looks good for meta in my opinion. As it is, it's not really a question in the SE sense.
    – qubyte
    Nov 25, 2011 at 12:07

1 Answer 1


(This answer if partly based on my blog post on the same topic.)


TeX’s font mechanism is pretty basic. There is no relationship between one text font and another: they are all simply set up using the \font primitive. This is also true for plain TeX, so

{\bf Some {\it text}}

will have ‘Some’ in bold, but ‘text’ in mid-weight italics. This is true whether you are looking at traditional .tfm fonts or loading system fonts with XeTeX or LuaTeX. The same is true for things like font size: there is no link between the sizes of different fonts at the TeX level.

LaTeX2e introduced the ‘New Font Selection Scheme’ (NFSS), which provides a method for managing fonts in a way that is likely to be more logical for the user. Thus

{\bfseries Some {\itshape text}}

will have the inner text both bold and italic. At the same time, the NFSS provides a system for loading font files in an organised way and substituting fonts when a particular shape/size combination is unavailable. (ConTeXt also provides a mechanism for font management on top of TeX's primitive system.)

Porting NFSS to LaTeX3

Over all, the NFSS is one the key successes of LaTeX2e compared with LaTeX2.09. There are also a lot of existing .fd files about for using fonts with LaTeX2e, and supporting those is important. So something like the NFSS is definitely needed: the ‘New’ is rather anachronistic nowadays, so the working title is just FSS.

The NFSS is not perfect, and so LaTeX3's FSS cannot be simply a clone of NFSS. Perhaps the most common complaint about the NFSS is that \textsc is treated as a shape, which makes it impossible to combine it with \textit to have italic small caps. Other areas which need addressing are for example flexible sizing and proportional/fixed width numbers for tables. This is all evolutionary, and so the plan is to port the existing NFSS first, tidy it up to fit better with LaTeX3 coding approaches, then add new abilities. There are packages on CTAN which address some of these shortcomings, and they will be one place to look for inspiration on changes. ConTeXt's approach might also be worht looking at, although I'd not expect any major changes at the LaTeX user level.

Font loading

The NFSS currently deals with not only things like font shape but also encodings and the underlying names of font files. With XeTeX and LuaTeX, the possibility to load Unicode fonts (thus effectively bypassing encodings) and to load system font by display name both become available. The problem here is that there are currently different interfaces for different cases.

The traditional LaTeX2e approach to this to set up a small(ish) package to select a font family, for example lmodern or mathptmx, which will then use the NFSS to load the appropriate TeX font files. For users of XeTeX or LuaTeX, the standard method is to use the fontspec package, which provides an interface between the extended \font primitives in these engines and the NFSS.

There are a few things to think about here. First, while XeTeX and LuaTeX can load system fonts directly, pdfTeX cannot. Secondly, even if you are using XeTeX or LuaTeX access to traditional TeX fonts cannot be ignored. There is a lot of MetaFont material on CTAN which is not available in any other format, so simply dropping support for these is not an option.

Coming up with an interface here needs to be consistent while addressing the needs of publishers, where system fonts may be a significant issue and where loading by name is desirable. There are ways of addressing this, but as-yet there no code written. A lot of the interface here will still need to be discussed.

Math mode

There are also math mode fonts to worry about. OpenType maths fonts are very much in development, but that doesn’t help with pdfTeX and again does not cover all cases. So again we need to continue to support TeX’s traditional math mode fonts. That will probably be the last part of this particular jigsaw to be tackled, simply because it’s the one with the least clear path at present. It's important to notice that at present something like mathptmx addresses both math and text fonts to some degree, and maintaining some form of consistent font appearance is very important.

You must log in to answer this question.

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