I want to know how does LaTeX figures out if the Eurosymbol (€) is a glyph of a given T1 font. I tried \iffontchar but it seems the value is not unique. AFAIK it's not a standard symbol of the 256 characters, so I'm interested in the algorithm.

Please note: I'm not interested in using the € symbol if my font doesn't has the glyph. I just want to catch the error and make it relax or redefine if glyph not in font. I'm also not interested in using opentype font.

Also the answer should work for PDFLaTeX, LuaLaTeX and XeLaTeX.

Here is what I wrote so far when I came across this:

    \input glyphtounicode
        \input glyphtounicode
        \ifXeTeX %XeTeX T1 german special char fix
            \newunicodechar{§}{\textsection}% I think it's okay because standard character... but
            %\newunicodechar{€}{here it should check if eurosymbol in t1 font and if not let him relax (print nothing)}
            \renewcommand{\SS}{\iffontchar\font"1E9E \symbol{"1E9E}\else SS\fi}
Office 0123456789 äüöÄÜÖß \texteuro € \textmu

Update Using textcomp package works and gets an unfaked glyph from the font. So this is solved. But I'm still interested in how I should define the %\newunicodechar{€}{} for fonts which don't have the special letters.

  • 1
    I am not a XeLaTeX expert, but do you not need one of the packages textcomp, fourier, marvosym, for example for \texteuro? – user31729 Jul 16 '14 at 21:06
  • No, the textcomp package fakes the glyph if it's not available. I don't want this and because of this I made the topic! – user49121 Jul 16 '14 at 21:07
  • 1
    If you're "not interested" in OpenType fonts, why do you care that the solution work under LuaLaTeX and XeLaTeX (in addition to, of course, pdfLaTeX)? One big reason for using LuaLaTeX and XeLaTeX is their ability to access OpenType fonts... – Mico Jul 16 '14 at 21:09
  • 2
    There are a number of reasons to use Lua(La)TeX besides just OpenType fonts: luamplib, lua scripting, etc. – acarlow Jul 16 '14 at 22:10
  • 3
    textcomp takes the glyph from a different (TS1 encoded) font not the T1 encoded font (these may be the same underlying type 1 font encoded two different ways but TeX does not "know" that.) – David Carlisle Jul 16 '14 at 22:25

With utf8 the Unicode character is mapped to \texteuro, which requires textcomp. The definition of \texteuro is


If the TS1 font for the current family is known not to have the Euro symbol (that is, it belongs to class 5), the glyph is faked by means of \tc@fake@euro. If you want instead to raise an error, just change the definition of this macro:


  \@latex@error{No \noexpand#1in family \f@family}{}%


\fontfamily{put}\selectfont % put belongs to class 5

This will issue

! LaTeX Error: No \texteuro in family put.

and no glyph will be printed. You could define it to use a glyph from another font instead, say


Note that a test based on \iffontchar\font191 will not succeed, because usually fonts built with fontinst have a black square for inexistent characters. Therefore textcomp bases its decision to fake or not a glyph on an internal database.

By the way, \iffontchar\font"1E9E will return false if eight bit TeX fonts are used, so it's a pretty useless test.

  • Helped me with \textquotesingle as well – silvado Dec 5 '16 at 17:00

LaTeX does not need to check anything, the T1 encoding doesn't include euro by definition. It is in the TS1 encoding (as used by textcomp) and of course in the EU1 and EU2 encodings used by lua and xe latex.


if everything else fails, you can try to fake the euro sign. this solution may not look as good, but it works anytime:


Your Answer

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