When loading a font by name, what is the search mechanism being used? How is the matching done? (It's marked TODO in the documentation)

I have many problems, for example: a "Hoefler Text Engraved" font is replacing the default "Hoefler Text" with bold \fontspec{Hoefler Text} \textbf{...}. Some of its metadata in fontforge:

PS Names

Family Name: Hoefler Text
Weight: Normal

TTF Names

Family: Hoefler Text Engraved
Styles (Subfamily): Regular
Preferred Family: Hoefler Text
Preferred Styles: Engraved

What does fontspec/fontconfig read in the file to match the requested font? (in this case "Hoefler Text/Bold"

  • From reading the code, it seems to rely on \font_set, but I don't know where this is defined (Disclaimer: LateX3 syntax looks very foreign to me so far).
    – raphink
    Sep 1, 2011 at 14:27

1 Answer 1


The detail depends on both the engine in use (XeTeX or LuaTeX) and also the operating system in question. However, in general the answer is 'fontspec does not actually do this'. More precisely, fontspec relies on features of the engine to load fonts. XeTeX and LuaTeX use different approaches to font loading. XeTeX contains operating system-dependent code, which therefore uses features of the system (as Windows, Mac OS X and Linux have different approaches to font management). On the other hand, the LuaTeX approach is implemented in Lua, using feature of the LuaTeX engine.

Coupled with these considerations, not all fonts are equal. Even if they have the same name, they may not be from the same supplier. Some fonts are regrettably 'faulty' in their internals, and this tends to show up when loading with fontspec.

Thus if you have an issue loading a particular font, then it's not just a question of saying 'fontspec can't find the font', but rather 'using fontspec with <engine> on <platform> cannot load font <name> from <supplier>'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.