[Tex/LaTex] (ConTeXt) Changing to garamond or other typefaces

contextfonts

As far as I understood changing the typeface from the default is hard in ConTeXt. Here is my example of using not the default typeface – first question: Is this the correct way?:

    \mainlanguage   [de]

%\usetypescript[Garamond][default]
%\setupbodyfont[Garamond,15pt]

\definepapersize[MyBook][A5]
\setuppapersize[MyBook][A5] % Prints on paper the size of MyBook
%\setuppapersize[MyBook][A4]

% Fonts & Typography
\definefontfeature[default][default][expansion=quality,protrusion=quality]
\setupalign[hz,hanging]

\usetypescript[palatino]
\setupbodyfont[palatino,10pt]
\setupbodyfontenvironment   [default][em=italic] % use italic as em, not slanted

\setuplayout[location=middle,
  topspace=1cm,
  bottomspace=1.5cm,
  width=middle,
  cutspace=2.6cm,
  backspace=1.3cm,
  height=fit,
  rightmargin=2cm,
  leftmargin=1cm,
  rightmargindistance=0.4cm,
  leftmargindistance=0.2cm,
  footer=1.2cm,
  grid=yes]

\starttext
This is a test text.
\stoptext

Now if I change from palatino to garamond by setting

\usetypescript[garamond]
    \setupbodyfont[garamond,10pt]

then ConTeXt goes back to its Standard Computer Modern, how to change to garamond?

Best Answer

The easiest way to use fonts with ConTeXt is to use the simplefonts module.

For testing, I am using EB Garamond. (You may need to run mtxrun --script fonts --reload to refresh the font database after you install the font).

\setuppapersize[A6]

\usemodule  [simplefonts][size=10pt]
\setmainfont[EB Garamond 12][expansion=quality,protrusion=quality]

\setupalign [hanging] 

\showframe % To show protrusion

\starttext
\input ward
\stoptext

enter image description here

Related Question