TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

How one can change font in the text form?



                var f = this.getField('name.1');
                f.textFont = 'Europe';
                f.userName = 'first name'

This example is not working. If I open the Adobe Acrobat Pro it says that the forms font is helvetica. If I change \usepackage[english,russian,french]{babel} to \usepackage[english]{babel} or \usepackage[russian]{babel} everything works.

share|improve this question
Do you have this font installed? I tried with other fonts (like Consolas or Times New Roman) it worked. – m0nhawk Feb 22 '13 at 8:43
Yes, I have this font installed. – Ptech Feb 22 '13 at 8:48
I've updated code, so that it represents the question. I found that the problem with french in babel. – m0nhawk Feb 22 '13 at 9:26
Not only french, when I add one more lang to babel this textfont format function not works. – Ptech Feb 22 '13 at 9:39
@Ptech The \select@language error is normal when you change options for babel and will vanish at the next LaTeX run, provided you don't interrupt the present one. – egreg Feb 22 '13 at 10:11
up vote 5 down vote accepted

Package babel uses shorthand characters for different languages. Example, ; is redefined as active character if french is loaded to insert some space before according to French typography.

With \shorthandoff and \shorthandon a shorthand character can be dis- and enabled:


Another possibility is the use of \string (or e-TeX's \detokenize). \string converts the next token to a character with catcode "other" (12, such as digits) or "space" (10) if the token has the character code of a space (32).

  format={... f.textFont = 'Europe'\string; ...},

Another problem is font embedding. The font is only referenced by name and must be installed at the system of the user.

share|improve this answer
For me only the \shorthandoff/\shorthandon way works. Using pdflatex. – m0nhawk Feb 23 '13 at 18:19

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.