TransWikia.com

How to typeset this Euro sign from Cochineal font

TeX - LaTeX Asked by Gamification on June 11, 2021

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:
Text in Cochineal font but € symbol is ugly, 1,99€

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:

enter image description here

How?

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

3 Answers

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}

enter image description here

Correct answer by Ulrike Fischer on June 11, 2021

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}

enter image description here

Answered by John on June 11, 2021

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}

Answered by Davislor on June 11, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP