[Tex/LaTex] Does lualatex embed fonts for compatibility


I am using fonts installed on my computer in LaTeX document as

The default font
{\fontx New font}
The default font

I create the pdf file with lualatex command. How custom fonts are embedded in the pdf document for the sake of compatibility? Readers probably does not have this custom font; does this make a problem in displaying the pdf document?

My knowledge about fonts is very limited. Sorry if it is a basic question. I just want to be sure about the compatibility of my pdf document when using rare fonts, and how to guarantee the document compatibility in different systems.

Best Answer

Fonts are always embedded, unless explicitly forced not to. Only the glyphs used in the font are put into the PDF (called subsetting).

There are two ways to use fonts in LuaTeX. The first is via the classical mechanism of tfm files and pdftex.map:

You can edit the file pdftex.map on your TeX system to a) force the whole font to be included (license issues might have to be considered) or to b) stop LuaTeX from putting any font information in the PDF file at all, but 99.999% of the users probably leave the settings

The second way with LuaTeX (that is what you use) is to directly include Type1/TrueType/OpenType fonts via the interface provided by luaotfload/fontspec. I am not sure if luaotfload allows a different setting than subsetting the fonts. In theory, it could be configured.