TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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"

share|improve this question
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). – ℝaphink Sep 1 '11 at 14:27
up vote 9 down vote accepted

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>'.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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