It's a very nice font and available from Google Font. Is it a way I can use it? Many tanks!
[Tex/LaTex] How to use Roboto Condensed font
fonts
Related Solutions
The problem, as described in comments, is to determine the correct font name for use with fontspec
.
Mini-Howto on selecting fonts with fontconfig
XeTeX relies on OS-specific libraries to load fonts. In case of Linux it is the fontconfig library. It's quite easy for basic use.
- If the font is already installed in the system (and many will be), it can be selected simply by its name. You can find out the precise name to use by issuing
fc-list
and examining the output (perhaps with the help ofgrep
). - If the font is not listed, it can be installed manually. Fonts can be installed system-wise or user-wise. I recommend the second way, because it does not require additional privileges and won't pollute the system directories. To install a font, simply place it in the
.fonts
directory in your home directory. You may need to create the directory if it doesn't exist, and you may need to enable display of hidden files to see this directory in your file manager. Once the font has been placed in the directory, runfc-cache
to regenerate the font cache, then try the first step again.
EBGaramond with Monotype Garamond Bold
This example mixes EBGaramond with Monotype's Garamond in pdfLaTeX. Note that this code will not compile as written for you. You would need to substitute a suitable alternative for the bold Garamond I've used. (Or configure TeX support for it on your machine, if you have the same font.)
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[scale=0.95]{ebgaramond}
\usepackage{kantlipsum}
\pdfmapfile{+mgm.map}
\usepackage{filecontents}
\begin{filecontents}{T1EBGaramond-OsF.fd}
\ProvidesFile{T1EBGaramond-OsF.fd}
\expandafter\ifx\csname EBGaramond@scale\endcsname\relax
\let\EBGaramond@@scale\@empty
\else
\edef\EBGaramond@@scale{s*[\csname EBGaramond@scale\endcsname]}%
\fi
\DeclareFontFamily{T1}{EBGaramond-OsF}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{sc}{
<-> \EBGaramond@@scale EBGaramond12-Regular-osf-sc-t1
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{n}{
<-> \EBGaramond@@scale EBGaramond12-Regular-osf-t1
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{it}{
<-> \EBGaramond@@scale EBGaramond12-Italic-osf-t1
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{scit}{
<-> \EBGaramond@@scale EBGaramond12-Italic-osf-sc-t1
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{sw}{
<-> \EBGaramond@@scale EBGaramond12-Italic-osf-swash-t1
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{nw}{
<-> \EBGaramond@@scale EBGaramond12-Regular-osf-swash-t1
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{n}{
<-> mgmb8t
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{sc}{
<-> mgmbc8t
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{it}{
<-> mgmb8t
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{sl}{
<-> mgmb8t
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{scsl}{ <-> ssub * EBGaramond-OSF/m/scit }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{sl}{ <-> ssub * EBGaramond-OsF/m/it }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{scit}{ <-> ssub * EBGaramond-OsF/b/sc }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{sw}{ <-> ssub * EBGaramond-OsF/b/it }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{nw}{ <-> ssub * EBGaramond-OsF/b/n }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{scsl}{ <-> ssub * EBGaramond-OsF/b/scit }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{sc}{ <-> ssub * EBGaramond-OsF/b/sc }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{n}{ <-> ssub * EBGaramond-OsF/b/n }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{it}{ <-> ssub * EBGaramond-OsF/b/it }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{scit}{ <-> ssub * EBGaramond-OsF/b/scit }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{sw}{ <-> ssub * EBGaramond-OsF/b/sw }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{nw}{ <-> ssub * EBGaramond-OsF/b/nw }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{scsl}{ <-> ssub * EBGaramond-OsF/b/scit }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{sl}{ <-> ssub * EBGaramond-OsF/b/it }{}
\endinput
\end{filecontents}
\begin{document}
\section{A section}
\kant[1]
\noindent{\bfseries \kant[1]}
ABC \textbf{ABC} abc \textbf{abc}
\end{document}
EBGaramond with Medium URW Garamond as Bold
This example takes the medium series from URW Garamond for bold text. You can install this using the getnonfreefonts-sys
script which is part of TeX Live.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{ebgaramond}
\usepackage{kantlipsum}
\usepackage{filecontents}
\begin{filecontents}{T1EBGaramond-OsF.fd}
\ProvidesFile{T1EBGaramond-OsF.fd}
\expandafter\ifx\csname EBGaramond@scale\endcsname\relax
\let\EBGaramond@@scale\@empty
\else
\edef\EBGaramond@@scale{s*[\csname EBGaramond@scale\endcsname]}%
\fi
\DeclareFontFamily{T1}{EBGaramond-OsF}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{sc}{
<-> \EBGaramond@@scale EBGaramond12-Regular-osf-sc-t1
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{n}{
<-> \EBGaramond@@scale EBGaramond12-Regular-osf-t1
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{it}{
<-> \EBGaramond@@scale EBGaramond12-Italic-osf-t1
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{scit}{
<-> \EBGaramond@@scale EBGaramond12-Italic-osf-sc-t1
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{sw}{
<-> \EBGaramond@@scale EBGaramond12-Italic-osf-swash-t1
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{nw}{
<-> \EBGaramond@@scale EBGaramond12-Regular-osf-swash-t1
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{n}{
<-> ugmm8t
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{it}{
<-> ugmmi8t
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{scsl}{ <-> ssub * EBGaramond-LF/m/scit }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{sl}{ <-> ssub * EBGaramond-OsF/m/it }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{sl}{<->ssub * EBGaramond-OsF/b/it}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{sc}{ <-> ssub * EBGaramond-OsF/b/n }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{scit}{ <-> ssub * EBGaramond-OsF/b/sc }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{sw}{ <-> ssub * EBGaramond-OsF/b/sl }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{nw}{ <-> ssub * EBGaramond-OsF/b/n }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{scsl}{ <-> ssub * EBGaramond-OsF/b/scit }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{sc}{ <-> ssub * EBGaramond-OsF/b/sc }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{n}{ <-> ssub * EBGaramond-OsF/b/n }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{it}{ <-> ssub * EBGaramond-OsF/b/it }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{scit}{ <-> ssub * EBGaramond-OsF/b/scit }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{sw}{ <-> ssub * EBGaramond-OsF/b/sw }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{nw}{ <-> ssub * EBGaramond-OsF/b/nw }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{scsl}{ <-> ssub * EBGaramond-OsF/b/scit }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{sl}{ <-> ssub * EBGaramond-OsF/b/it }{}
\endinput
\end{filecontents}
\begin{document}
\section{A section}
\kant[1]
\noindent{\bfseries \kant[1]}
ABC \textbf{ABC} abc \textbf{abc}
\end{document}
Note that URW Garamond includes a restricted set of font shapes in comparison with EBGaramond. So small-caps bold will be typeset in non-small-caps upright medium, for example, as there is no medium small-caps available.
EBGaramond with Extended URW Garamond Bold
This uses fonts from garamondx
which extends the URW families provided in garamond
. You may wish to adjust the scaling factor, as in the other examples. Like garamond
which provides the standard URW Garamond, garamondx
can be installed using getnonfreefonts-sys
.
Olstyle Figures
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[scale=1.05]{ebgaramond}
\usepackage{kantlipsum}
\usepackage{filecontents}
\begin{filecontents}{T1EBGaramond-OsF.fd}
\ProvidesFile{T1EBGaramond-OsF.fd}
\expandafter\ifx\csname EBGaramond@scale\endcsname\relax
\let\EBGaramond@@scale\@empty
\else
\edef\EBGaramond@@scale{s*[\csname EBGaramond@scale\endcsname]}%
\fi
\expandafter\ifx\csname zgm@Scale\endcsname\relax
\let\zgm@@Scale\@empty
\else
\edef\zgm@@Scale{s*[\csname zgm@Scale\endcsname]}%
\fi
\def\zgm@tmp{\ifzgm@swq \def\zgm@@swq{-swq}\fi}
\let\zgm@@swq\@empty
\ifdefined\zgm@swqtrue
\zgm@tmp
\fi
\DeclareFontFamily{T1}{EBGaramond-OsF}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{sc}{
<-> \EBGaramond@@scale EBGaramond12-Regular-osf-sc-t1
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{n}{
<-> \EBGaramond@@scale EBGaramond12-Regular-osf-t1
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{it}{
<-> \EBGaramond@@scale EBGaramond12-Italic-osf-t1
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{scit}{
<-> \EBGaramond@@scale EBGaramond12-Italic-osf-sc-t1
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{sw}{
<-> \EBGaramond@@scale EBGaramond12-Italic-osf-swash-t1
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{nw}{
<-> \EBGaramond@@scale EBGaramond12-Regular-osf-swash-t1
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{n}{
<-> \zgm@@Scale T1-zgm-b-osfI\zgm@@swq
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{it}{
<-> \zgm@@Scale T1-zgm-bi-osfI\zgm@@swq
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{sc}{
<-> \zgm@@Scale T1-zgm-b-osfI-sc\zgm@@swq
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{scit}{
<-> \zgm@@Scale T1-zgm-bi-osfI-sc\zgm@@swq
}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{scsl}{ <-> ssub * EBGaramond-LF/m/scit }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{m}{sl}{ <-> ssub * EBGaramond-OsF/m/it }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{scsl}{ <-> ssub * EBGaramond-OsF/b/scit }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{sl}{<->ssub * EBGaramond-OsF/b/it}{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{sw}{ <-> ssub * EBGaramond-OsF/b/sl }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{b}{nw}{ <-> ssub * EBGaramond-OsF/b/n }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{sc}{ <-> ssub * EBGaramond-OsF/b/sc }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{n}{ <-> ssub * EBGaramond-OsF/b/n }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{it}{ <-> ssub * EBGaramond-OsF/b/it }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{scit}{ <-> ssub * EBGaramond-OsF/b/scit }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{sw}{ <-> ssub * EBGaramond-OsF/b/sw }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{nw}{ <-> ssub * EBGaramond-OsF/b/nw }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{scsl}{ <-> ssub * EBGaramond-OsF/bx/scit }{}
\DeclareFontShape{T1}{EBGaramond-OsF}{bx}{sl}{ <-> ssub * EBGaramond-OsF/bx/it }{}
\endinput
\end{filecontents}
\begin{document}
\section{A section}
\kant[1]
\noindent{\bfseries \kant[1]}
ABC \textbf{ABC} abc \textbf{abc}
\end{document}
Lining Figures
Here's a variation on the example above of EBGaramond with Extended URW Garamond bold. This one using lining, rather than oldstyle, figures.
\end{document}
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[scale=1.05,lining]{ebgaramond}
\usepackage{filecontents}
\begin{filecontents}{T1EBGaramond-LF.fd}
\ProvidesFile{T1EBGaramond-LF.fd}
\expandafter\ifx\csname EBGaramond@scale\endcsname\relax
\let\EBGaramond@@scale\@empty
\else
\edef\EBGaramond@@scale{s*[\csname EBGaramond@scale\endcsname]}%
\fi
\expandafter\ifx\csname zgm@Scale\endcsname\relax
\let\zgm@@Scale\@empty
\else
\edef\zgm@@Scale{s*[\csname zgm@Scale\endcsname]}%
\fi
\def\zgm@tmp{\ifzgm@swq \def\zgm@@swq{-swq}\fi}
\let\zgm@@swq\@empty
\ifdefined\zgm@swqtrue
\zgm@tmp
\fi
\DeclareFontFamily{T1}{EBGaramond-LF}{}
\DeclareFontShape{T1}{EBGaramond-LF}{m}{sc}{
<-> \EBGaramond@@scale EBGaramond12-Regular-lf-sc-t1
}{}
\DeclareFontShape{T1}{EBGaramond-LF}{m}{n}{
<-> \EBGaramond@@scale EBGaramond12-Regular-lf-t1
}{}
\DeclareFontShape{T1}{EBGaramond-LF}{m}{it}{
<-> \EBGaramond@@scale EBGaramond12-Italic-lf-t1
}{}
\DeclareFontShape{T1}{EBGaramond-LF}{m}{scit}{
<-> \EBGaramond@@scale EBGaramond12-Italic-lf-sc-t1
}{}
\DeclareFontShape{T1}{EBGaramond-LF}{m}{sw}{
<-> \EBGaramond@@scale EBGaramond12-Italic-lf-swash-t1
}{}
\DeclareFontShape{T1}{EBGaramond-LF}{m}{nw}{
<-> \EBGaramond@@scale EBGaramond12-Regular-lf-swash-t1
}{}
\DeclareFontShape{T1}{EBGaramond-LF}{b}{n}{
<-> \zgm@@Scale T1-zgm-b-lf\zgm@@swq
}{}
\DeclareFontShape{T1}{EBGaramond-LF}{b}{it}{
<-> \zgm@@Scale T1-zgm-bi-lf\zgm@@swq
}{}
\DeclareFontShape{T1}{EBGaramond-LF}{b}{sc}{
<-> \zgm@@Scale T1-zgm-b-lf-sc\zgm@@swq
}{}
\DeclareFontShape{T1}{EBGaramond-LF}{b}{scit}{
<-> \zgm@@Scale T1-zgm-bi-lf-sc\zgm@@swq
}{}
\DeclareFontShape{T1}{EBGaramond-LF}{m}{scsl}{ <-> ssub * EBGaramond-LF/m/scit }{}
\DeclareFontShape{T1}{EBGaramond-LF}{m}{sl}{ <-> ssub * EBGaramond-LF/m/it }{}
\DeclareFontShape{T1}{EBGaramond-LF}{b}{scsl}{ <-> ssub * EBGaramond-LF/b/scit }{}
\DeclareFontShape{T1}{EBGaramond-LF}{b}{sl}{<->ssub * EBGaramond-LF/b/it}{}
\DeclareFontShape{T1}{EBGaramond-LF}{b}{sw}{ <-> ssub * EBGaramond-LF/b/sl }{}
\DeclareFontShape{T1}{EBGaramond-LF}{b}{nw}{ <-> ssub * EBGaramond-LF/b/n }{}
\DeclareFontShape{T1}{EBGaramond-LF}{bx}{sc}{ <-> ssub * EBGaramond-LF/b/sc }{}
\DeclareFontShape{T1}{EBGaramond-LF}{bx}{n}{ <-> ssub * EBGaramond-LF/b/n }{}
\DeclareFontShape{T1}{EBGaramond-LF}{bx}{it}{ <-> ssub * EBGaramond-LF/b/it }{}
\DeclareFontShape{T1}{EBGaramond-LF}{bx}{scit}{ <-> ssub * EBGaramond-LF/b/scit }{}
\DeclareFontShape{T1}{EBGaramond-LF}{bx}{sw}{ <-> ssub * EBGaramond-LF/b/sw }{}
\DeclareFontShape{T1}{EBGaramond-LF}{bx}{nw}{ <-> ssub * EBGaramond-LF/b/nw }{}
\DeclareFontShape{T1}{EBGaramond-LF}{bx}{scsl}{ <-> ssub * EBGaramond-LF/bx/scit }{}
\DeclareFontShape{T1}{EBGaramond-LF}{bx}{sl}{ <-> ssub * EBGaramond-LF/bx/it }{}
\endinput
\end{filecontents}
\begin{document}
ABCDEFGHIJKLMNOPQRSTUVWXYZ
\textbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ}
abcdefghijklmnopqrstuvwxyz
\textbf{abcdefghijklmnopqrstuvwxyz}
0123456789
\textbf{0123456789}
\end{document}
Extended URW Garamond Medium and Bold
These examples do not use EBGaramond at all. Instead, they take Speravir's advice and use the extended fonts supplied by garamondx
for both medium and bold.
Oldstyle Figures
\documentclass{article}
\usepackage[full]{textcomp}
\usepackage[osfI]{garamondx}
\usepackage{kantlipsum}
\begin{document}
\section{A section}
\kant[1]
\noindent{\bfseries \kant[1]}
ABC \textbf{ABC} abc \textbf{abc}
Lining Figures
\documentclass{article}
\usepackage[full]{textcomp}
\usepackage{garamondx}
\begin{document}
ABCDEFGHIJKLMNOPQRSTUVWXYZ
\textbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ}
abcdefghijklmnopqrstuvwxyz
\textbf{abcdefghijklmnopqrstuvwxyz}
0123456789
\textbf{0123456789}
\end{document}
Best Answer
Download the font: http://www.fontsquirrel.com/fonts/roboto
Install it into your system.
Typeset the following using xelatex or lualatex: