2

I need to use the package gfsartemisia-euler to change the font of a book originally written with the palatine font to artemisia. My problem is as follows:

When I use \textsc or \scshape the character ú is replaced with ý

this happens only to this character, all the others seem to work correctly. Here is a minimal example.

\documentclass{scrbook}
\usepackage{gfsartemisia-euler} 
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[brazil]{babel}
\usepackage{tipa}

\begin{document} \scshape Os números \

Os n'umeros \

Nos capítulos, nas equações...\

É mesmo? Então faça com as próprias mãos

Höla e também H"ola. (Exige tipa) \end{document}

After compiling this file it produces the output

enter image description here

Sebastiano
  • 54,118

1 Answers1

1

It is indeed a bug in the T1 version of GFSArtemisia. This is the part of the fonttable corresponding to Latin smallcaps:

enter image description here

You can see that Ý is listed twice while the first entry should be Ú. This should be reported to the maintainer so it can be fixed.

However, the OTF version from https://ctan.org/tex-archive/fonts/greek/gfs/gfsartemisia/opentype does have ú in smallcaps. So, if you want you can use a rather convoluted workaround to use this character with pdfLaTeX. The idea is to create a pdf file with only this character and set up a mapping in pdfLaTeX from ú to including this pdf, but only for smallcaps (and map to \'u for all other font styles).

Standalone ú smallcaps, compile with XeLaTeX or LuaLaTeX. In the code below this file is referred to as artemisscu.pdf.

\documentclass{standalone}
\usepackage{fontspec}
\setmainfont{GFSArtemisia.otf}
\begin{document}
\textsc{ú}
\end{document}

Mapping, using small caps detection from https://tex.stackexchange.com/a/31660:

\documentclass{scrbook}
\usepackage{gfsartemisia-euler} 
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[brazil]{babel}
\usepackage{tipa}
\usepackage{newunicodechar}
\usepackage{graphicx}

\makeatletter \newcommand{\IfSmallCapsTF}{% \ifx\f@shape\my@test@sc \expandafter@firstoftwo \else \expandafter@secondoftwo \fi } \newcommand{\my@test@sc}{sc} \makeatother

\newunicodechar{ú}{\IfSmallCapsTF{\raisebox{-0.02Ex}{\includegraphics[width=1.12Ex]{artemisscu}}}{'u}}

\begin{document} Os números

\scshape Os números

\Huge Os números

\tiny Os números

\normalsize Os n'umeros

Nos capítulos, nas equações...

É mesmo? Então faça com as próprias mãos

Höla e também H"ola. (Exige tipa)

\normalfont Os números

\end{document}

Note that the size and positioning of the graphic is set in Ex units so it scales with the font size.

Result:

enter image description here

Note that \'u itself is not mapped, so you need the actual ú as input to make it work.

Marijn
  • 37,699