4

Is it at all possible to typeset text in Esperanto language (with LuaLaTeX) using Adobe Garamond Pro font? After some research and testing it appears there is no way to do this, that some characters (such as ĉ, ŭ, ĥ) are simply missing and impossible to create even with composite commands (like \^ c).

Or is there a way around it? Thanks in advance for any help!

Edit Upon request adding MWE:

%%%! lualatex

\def\fontBaseName{adobegaramondpro}
\def\fontBaseNameBold{agaramondprosemibold}

\documentclass[11pt,twoside,openright]{book}
\usepackage{polyglossia}
\setdefaultlanguage{esperanto}
\setmainfont[BoldFont={\fontBaseNameBold}]{\fontBaseName}
\begin{document}
Antaŭparolo

Ĉi-loke estas kaj fariĝis ŝoseo estas ŝtopita teĥnike
\end{document}

The result: enter image description here

13
  • 1
    I don't have the font so can't test, but do you mean it doesn't have the ^ accent at all? (you could take one from another font) Jul 30, 2017 at 12:13
  • @DavidCarlisle: it does have the accent, however if I try e.g. this \^ o \^ g \^ h I get ô g h, in other words it puts the accent over o but not over g and h.
    – Marcel S.
    Jul 30, 2017 at 12:18
  • Please show a minimal example of what you try to compile.
    – TeXnician
    Jul 30, 2017 at 12:23
  • 1
    also show the full log for your test file, recent latex releases have tried harder to avoid problems in this area, so it depends on which version you have Jul 30, 2017 at 12:26
  • 2
    I have the font and it clearly reports "there is no 0302" (that's the accent) and similar for the accented glyphs. Jul 30, 2017 at 15:04

1 Answer 1

3

This is a few years old, but I saw it when it landed back on the front page, and it deserves an answer. Actually, it deserves two, depending on which problem you want to solve: getting those accents in Garamond, or faking accented characters in a font that does not contain them.

You update in the comments to say that you ended up using Linotype Garamond Premier. In 2020, a free font that contains all these characters is EB Garamond. Garamond Libre would also work.

\tracinglostchars=2
\documentclass[11pt,twoside,openright]{book}
\pagestyle{empty} % Suppress page numbering.
\usepackage{polyglossia}
\setdefaultlanguage{esperanto}
\usepackage{ebgaramond}
\begin{document}
Antaŭparolo

Ĉi-loke estas kaj fariĝis ŝoseo estas ŝtopita teĥnike
\end{document}

EB Garamond sample

If you are looking instead for a solution to the problem that your font does not contain combining accents (rare these days, but I have run into it), you can tell LaTeX to use non-combining accents. A MWE for your sample:

\tracinglostchars=2
\documentclass[11pt,twoside,openright]{book}
\pagestyle{empty} % Suppress page numbering.

\usepackage{polyglossia}
\usepackage{newunicodechar}
\setdefaultlanguage{esperanto}
\usepackage{ebgaramond}

\DeclareTextAccent{\^}{\UnicodeEncodingName}{"02C6} % Modifier letter circumflex accent
\DeclareTextAccent{\u}{\UnicodeEncodingName}{"02D8} % Spacing breve
\newunicodechar{Ĉ}{\^{C}}
\newunicodechar{ĝ}{\^{g}}
\newunicodechar{ŝ}{\^{s}}
\newunicodechar{ĥ}{\^{h}}
\newunicodechar{ŭ}{\u{u}}

\begin{document}
Antaŭparolo

Ĉi-loke estas kaj fariĝis ŝoseo estas ŝtopita teĥnike
\end{document}

EB Garamond with faked accents

The Unicode standard says that canonically-precomposed and decomposed characters should be equivalent, but not every font on every system implements that correctly. If a font you want to use contains combining accents, but a precomposed character does not work, delete the \DeclareTextCommand lines from the above example.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .