Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
1  
Your example code is not minimal. Setting the layout, language or paper is not related to your question at all. Have a look at Wiki - Fonts in LuaTeX, especially the simplefonts module. –  Marco Oct 30 '12 at 12:08
1  
Which Garamond font are you using? Afaict the minimals don’t ship with an official typescript for any of the Garamond variants, so it’s no wonder your example fails. If you are lucky, Wolfgang may have one ready for you edition in his typescript collection. Else in order to write a typescript more information is needed: which file contains which face etc. –  phg Oct 30 '12 at 12:32
    
Ok, with \usemodule[simplefonts] \setmainfont[helvetica] I can change it to helvetica, but now \definefontfeature[default][default][expansion=quality,protrusion=quality] \setupalign[hz,hanging] has no effect. That may be related to the typescript, which is needed, correct? If so, which other than default and Palatino are supported? –  Mustafa Oct 30 '12 at 13:10

1 Answer 1

up vote 3 down vote accepted

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

share|improve this answer
    
Thank you. Two questions: First, how can I install this font in Windows with protrusion? And second: Where can I find more font, which support protrusion? –  Mustafa Nov 1 '12 at 8:20
1  
ConTeXt should be able to fibd the font in the default windows font directory. So just install the font the normal way and reload the font database. AFAIU, all (latin script based) fonts support protrusion. –  Aditya Nov 1 '12 at 12:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.