# How to typeset this Euro sign from Cochineal font

The euro symbol in my documents that use cochineal font looks really bad, however in the font tables in the cochineal documentation there's an euro sign which looks decent. Here's the € I get:

\documentclass{report}
\usepackage{cochineal}
\usepackage[T1]{fontenc}

\begin{document}
Text in Cochineal font but € symbol is ugly 1,99€
\end{document}


But I would like to typeset the € sign from the cochineal documentation:

How?

(I installed cochineal from ctan and reran pdflatex on the documentation to make sure the font version isn't the problem)

Neither the latex format nor the font package itself declares which subset of TS1-encoding the font supports, and so a rather conservative default (9) is used which means that the euro is faked with a C and an equal sign.

You can set the subset number, but someone will have to check which one is actually correct (the 7 in the code below is rather conservative too). At best ask the maintainer of the font. He can then make a request that the setting is added to the latex format (it contains already a long list for various fonts).

\documentclass{report}
\usepackage{cochineal}
\usepackage[T1]{fontenc}
\DeclareEncodingSubset{TS1}{Cochineal-*}{7} %number should be smaller than 8
\begin{document}
Text in Cochineal font but € symbol is ugly 1,99€
\end{document}


• Thank you so much. I applied that line to my other documents and now they look great. I'll wait a few days if anything comes up here and then inform the package maintainer that they may want to look into this. – Gamification Sep 10 '20 at 12:51
• Falling back to combining a C with a = sounds like a terrible choice to be honest. shakes head – Gamification Sep 10 '20 at 12:59
• well if a font doesn't have the char it is better than leaving a white space or using some arbitrary euro from another font. But nowadays it is not often needed to fake it, most fonts do have the euro. – Ulrike Fischer Sep 10 '20 at 13:05

This seems to be a bug in the package, which I'll mention to the author, but what you can do in the meantime is

% !TEX encoding = UTF-8 Unicode
\documentclass{report}
\usepackage[TS1]{fontenc}
\usepackage{cochineal}
\renewcommand{\texteuro}{{\fontencoding{TS1}\fontfamily{Cochineal-LF}\selectfont \char191 }}

\begin{document}
Text in Cochineal font, and the € symbol is no longer ugly 1,99€

\texteuro

\end{document}


• I've already accepted Ulrike Fischers answer but yours works just as well. I'm wondering which of the two ways of resolving this is the better. Thank you for mentioning it to the author, now I won't have to do it. – Gamification Sep 10 '20 at 12:53
• No bug. Just missing information from the font package maintainer. – egreg Sep 10 '20 at 13:02
• @Gamification -- My answer is simply a work-around for the single character you were after. Ulrike's answer goes to the heart of the matter and might address some other issues as well. – John Sep 10 '20 at 14:40
• The most recent updates to Cochineal (now in CTAN) have resolved this issue. – John Sep 25 '20 at 20:25

As with a great many questions about legacy 8-bit fonts, you can solve the problem by loading the font in a modern format from LuaLaTeX.

\documentclass{report}
\tracinglostchars=2
\usepackage{fontspec}

\setmainfont{Cochineal}[Scale=1.0]

\begin{document}
Text in Cochineal font but € symbol is ugly 1,99€
\end{document}

• Thanks but I use plain pdflatex. – Gamification Sep 10 '20 at 12:55