2

I have a document that I prepared with the ebgaramond package, because I like the look of Garamond fonts. It looks fine on the screen, but when I try to print it, all the characters that should be in the garamond font just come out as hollow rectangles. What can I do to try and resolve this?

Some details: I'm using pdflatex (via TexShop) on a Mac. I've tried upgrading to TexLive 2019 and making sure my printer drivers are up to date, but those things didn't change anything.

On a suggestion from @Mico, I tried compiling the document using LuaLaTeX and XeLaTeX instead of pdflatex. They both complain about the ebgaramond package. Here's a MWE:

\documentclass[a4paper]{article}

\usepackage{ebgaramond}

\begin{document}

This is a test.

\end{document}

and here's the output from LuaLaTeX:

This is LuaTeX, Version 1.10.0 (TeX Live 2019) 
 restricted system commands enabled.
(./ebgaramond.tex
LaTeX2e <2020-02-02> patch level 1
 L3 programming layer <2020-02-11>
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2019/texmf-dist/tex/latex/ebgaramond/ebgaramond.sty
(/usr/local/texlive/2019/texmf-dist/tex/generic/iftex/ifxetex.sty
(/usr/local/texlive/2019/texmf-dist/tex/generic/iftex/iftex.sty))
(/usr/local/texlive/2019/texmf-dist/tex/generic/iftex/ifluatex.sty)
(/usr/local/texlive/2019/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2019/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2019/texmf-dist/tex/generic/xkeyval/xkvutils.tex
(/usr/local/texlive/2019/texmf-dist/tex/generic/xkeyval/keyval.tex))))
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/textcomp.sty)
(/usr/local/texlive/2019/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def))
) (/usr/local/texlive/2019/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/fontenc.sty)
(/usr/local/texlive/2019/texmf-dist/tex/latex/fontspec/fontspec.cfg)))

/usr/local/texlive/2019/texmf-dist/tex/latex/ebgaramond/ebgaramond.sty:140: LaT
eX3 Error: Command '\swshape' already defined!

For immediate help type H <return>.
 ...                                              

l.140   \newfontfamily
                    \ebgaramondOsF
6
  • @Mico it looks fine on the screen, it's only when sent to a printer that it becomes illegible. I had the same problem with the "straight" TexLive 2015, and upgraded to 2019 to test it, with the same results. Unfortunately, the "straight" TexLive 2019 is not compatible with my OS, so using the command line installer is the only option.
    – N. Virgo
    Feb 13, 2020 at 7:10
  • @Mico thank you for the hint, and I'm sorry it's been deleted - it seems LuaLaTeX and XeLaTeX both don't like the ebgaramond package. I'll update the question.
    – N. Virgo
    Feb 13, 2020 at 7:29
  • 4
    Write to the author of ebgraramond. As LaTeX now defines \swshape the package shouldn't do it anymore. As a workaround you can do \let\swshape\undefined before loading the package. Feb 13, 2020 at 8:08
  • @UlrikeFischer thanks! With that workaround I can compile the document in LuaLaTeX and it prints fine. (But it still has the missing glyphs issue when compiled with pdflatex and printed.)
    – N. Virgo
    Feb 13, 2020 at 8:27
  • 1
    The readme in texmf-dist\doc\fonts\ebgaramond has the address. Feb 13, 2020 at 9:14

1 Answer 1

1

I would like to suggest that until the maintainer of the ebgaramond package provides an update to make it compilable under the latest versions of LuaLaTeX and XeLaTeX, you either follow Ulrike's suggestion and issue the instruction \let\swshape\undefined before loading the ebgaramond package or load the font via the fontspec-\setmainfont route.

An advantage of the fontspec route is that it lets you enable additional ligatures beyond the "basic 5" set, viz., ff, fi, ffi, fl, and ffl. With either LuaLaTeX or XeLaTeX, the MWE (minimum working example) shown below generates the following output:

enter image description here

In contrast, the output generated with pdfLaTeX is as follows:

enter image description here

\documentclass{article}
\usepackage{iftex}
\ifluatex
  \usepackage[no-math]{fontspec}
  \setmainfont{EB Garamond}[Ligatures={TeX,Common,Rare},
      Numbers={OldStyle,Proportional}] % choose suitable options
\else\ifxetex
  \usepackage[no-math]{fontspec}
  \setmainfont{EB Garamond}[Ligatures={TeX,Common,Rare},
      Numbers={OldStyle,Proportional}]
\else % we must be using pdftex
  \usepackage[oldstyle,proportional]{ebgaramond}
\fi\fi
\begin{document}
0123456789. ff fi ffi fl ffl. The. fb ffb fh ffh fj ffj fk ffk ft fft. \em as es is us
\end{document} 

You must log in to answer this question.

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