# Embedding a complete rather than a partial font

Is it possible to make XELatex embed a full rather than a partial font?

The reason I ask is that I am trying to induce a fillable form to use the body font (a question asked before by several participants without satisfactory answer - e.g. related questions here or here). Acrobat forms can apparently only use embedded fonts if they are fully embedded rather than partially embedded - see here). At the moment I can create a form that uses my body font in the fillable fields, but this only works if the font is installed on the users machine.

Once I get a positive response to the above I'll extend my question to the actual use of this font in form.

Below a rather trivial MWE (in this case using libertine) for anyone who wants a starting point to experiment.

\documentclass{article}
\usepackage{fontspec}
\usepackage{libertine}
\begin{document}
The quick brown fox jumps over the dog 0123456789.
\end{document}

The below provides an extended MWE using the eforms package (somewhat unrelated to the question of font embedding). Not specifying any font uses the default helvetica for the field (which looks horrible) as does the underlying hyperref field. Using TiRo as the font at least gives a reasonably decent looking serif font (albeit not libertine) which seems to work in Acrobat reader, PDF-XChange viewer and the inbuilt Windows 8 reader. Specifying LinLibertineO as the font gives libertine in the field (only if this is installed, and only in Acrobat Reader, but not PDF-XChange viewer and the inbuilt Windows 8 reader).

\documentclass{article}
\usepackage{fontspec}
\usepackage{libertine}
\usepackage{eforms}
\begin{document}

\everyTextField{
\BC{1 0 0} % border color
\BG{.941 1 .941} % background color
\textColor{0 0 1} % is black
\textFont{TiRo} % LinLibertineO/TiRo (options see commentary)
\textSize{10}
\Ff{\FfDoNotScroll}
}

\end{document}
• could you (a) complete your MWE, i.e. include a basic version of that fillable form you're trying to implement, and (b) provide a link to that other question you're mentioning? Oct 23, 2013 at 19:47
• Added a couple of links relating to the problem of having consistent fonts in forms. Have not added an actual form as yet, because unless it is possible to embed the full font, the issue is completely academic, and intrinsic to the PDF format. PDF forms cannot use fonts that are partially embedded, but can easily use system fonts (in any event I tend to use the great eforms package for forms which would result in MWE which would not compile for many as eforms not in Texlive). [I will add a second MWE later today which might help folk who have battled, as I did, to use system fonts in forms] Oct 23, 2013 at 20:38
• Found a step in the right direction: boekenenproefschriften.nl/proefschriften/sites/default/files/… Jun 30, 2016 at 15:20
• Beware, embedding the whole fonts might not be covered by the license of the fonts, especially professional fonts. Jun 27, 2017 at 12:21
• Interestingly, if I open the PDF with Acrobat Reader DC version 2018.011.20058 on a machine that has the font installed on the system and then click on a "combo box" element whose font is set to the target with JavaScript (this.getField('myCombo').textFont = "theFont";), Adobe Reader DC will embed the full font in the PDF. I can see this with Preferences (Ctrl-D). It's a work-around that doesn't require Acrobat, but is a manual step nonetheless. I suspect combo box elements load the entire font? Aug 29, 2018 at 22:22