8

Is there a way (simple or otherwise) to import a single character from another font under specific characters, or otherwise alter the character?

I'm using the very attractive Garamond font from here, but there is a slight problem - when using \ae{} with \textsc{}, the font defaults to lower case.

A MWE can be gained by downloading the package from the website mentioned, then using this code:

\documentclass[a4paper,10pt]{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{garamond}
\renewcommand{\rmdefault}{ggm}\normalfont

\begin{document}

\garamond
Normal ligature: \ae{}

Capital ligature: \AE{}

Small Caps: \textsc{\AE{}, \ae{}, Isch\ae{}mia}
\end{document}

The result is shown in the following figure (I also did it without Garamond, to be sure it wasn't just a problem with my code).

MWE Result

Using the provided font sfd files, FontForge, and most of the instructions given here, I have been able to generate a font that corrects the problem, but it loses most of the hanging fonts and whatnot, or rather it utilises them sporadically.

Does anyone know how to point LaTeX to use a different glyph, either a modified version of the standard capital or the glyph from the self-built version of the font?

  • this won't exactly answer your question, but solve your original problem: there's better Garamonds around, even in the TeX world. Try the ebgaramond package, for example, which will give you a proper SC ae, and better overall results as well. – Nils L Oct 11 '13 at 21:24
  • Thanks Nils L - that was going to be my solution if the solution below hadn't worked. If I come across any other problems, though, thanks for the tip. – Phil G Oct 11 '13 at 22:46
5

The small caps font has only the 26 unaccented letters realized as small caps. So much work would be needed for getting all the characters. If all you need is æ, do the following steps.

  1. run vftovp ggmrc8t.vf > ggmrc8t.vpl
  2. open the resulting ggmrc8t.vpl file with a text editor.
  3. find the entry starting with CHARACTER O 346 and change it to read

    (CHARACTER O 346
       (CHARWD R 0.8552)
       (CHARHT R 0.5452)
       (CHARDP R 0.016)
       (COMMENT
          (KRN C v R 0.001)
          (KRN C y R 0.001)
          (KRN O 375 R 0.001)
          (KRN O 270 R 0.001)
          (KRN O 47 R -0.003)
          (KRN C t R 0.002)
          (KRN C w R -0.005)
          (KRN C x R -0.007)
          (KRN C V R -0.076)
          (KRN O 265 R 0.002)
          )
       (MAP
          (SELECTFONT D 1)
          (SETCHAR O 306)
          )
       )
    
  4. run vftovp ggmrc8t.vpl and replace the corresponding tfm and vf file with the new ones.

What I did is mapping the character to the Æ in reduced size and computing new height and width by scaling at 80% the dimensions of the Æ character. However, trying other characters will fail and need other similar massaging.

enter image description here

  • Thanks - I'd managed to waste 3 days trying to figure it out! – Phil G Oct 11 '13 at 22:45
  • @PhilG Actually this is a simplistic solution: there are many kerning pairs involving æ and I didn't approach the problem. Go to EB Garamond. ;-) – egreg Oct 11 '13 at 22:56

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.