# Solving an unexpected interaction between ebgaramond and Franklin Gothic

Here's my MWE, and its output (XeLaTeX, TeXLive 2012 latest, Windows 7):

\documentclass{article}
\usepackage{fontspec}
\usepackage{ebgaramond}     %%% <== This one
\setsansfont[%
]{ITC Franklin Gothic Std Book}
\newfontfamily\xffamily[%
BoldFont=*,
]{ITC Franklin Gothic Std Book}
\usepackage{lipsum}
\begin{document}
\sffamily
\lipsum[39]
\xffamily
\lipsum[39]
\end{document}


The first paragraph is, unexpectedly, in bold type. (From the PDF, it's actually Franklin Gothic Std Demi). If I eliminate the call to ebgaramond, everything comes out in normal type.

Although I know how to eliminate this (see the definition for \xffamily), I'd really like to know what's going on, as I really feel I shouldn't need to.

Can anyone enlighten me as to what's going on?

Update 1

ebgaramond.sty contains the following line:

\renewcommand{\bfdefault}{m}


If this line is removed, my problem goes away. However, I'd still like to understand what's happening here, especially as I don't think I'm invoking anything remotely bold.

Update 2

I'm in touch with Bob Tennent, the maintainer of ebgaramond.sty, who is examining the case...

-
I'd say that the choice made by the author of ebgaramond.sty is disputable. –  egreg May 5 '13 at 20:22

I've tried with Gill Sans, since I don't have ITC Franklin Gothic, but the result is the same. Here's what I get in the log file:

.................................................
. fontspec info: "defining-font"
.
. Font family 'GillSans(0)' created for font 'Gill Sans' with options [,].
.
. This font family consists of the following shapes:
.
. * 'normal' with NFSS spec.:
. <->"Gill Sans/AAT:"
.
. * 'normal' with NFSS spec.:
. <->"Gill Sans/B/AAT:"
.
. * 'italic' with NFSS spec.:
. <->"Gill Sans/I/AAT:"
.
. * 'italic' with NFSS spec.:
. <->"Gill Sans/BI/AAT:"
.................................................


This refers to the "sans" family. Do you see where the thing goes wrong? Giving the meaning m to \bfdefault causes fontspec to assign the bold font to the medium weight after it has assigned the medium weight font.

Instead, for the definition of \xffamily I get

.................................................
. fontspec info: "defining-font"
.
. Font family 'GillSans(1)' created for font 'Gill Sans' with options
. [,BoldFont=*, ].
.
. This font family consists of the following shapes:
.
. * 'normal' with NFSS spec.:
. <->"Gill Sans/AAT:"
.
. * 'normal' with NFSS spec.:
. <->"Gill Sans/AAT:"
.
. * 'italic' with NFSS spec.:
. <->"Gill Sans/I/AAT:"
.
. * 'italic' with NFSS spec.:
. <->"Gill Sans/I/AAT:"
.................................................


which is wrong either.

My conclusion is that fontspec relies on the meaning of \mddefault, \bfdefault and so on for assigning fonts to families and the setting made by ebgaramond.sty (in order to avoid messages about non-existing boldface font) is utterly wrong.

## "Solution"

\let\origbfdefault\bfdefault
\usepackage{ebgaramond}
\let\bfdefault\origbfdefault

-