Changes

Jump to navigation Jump to search
m
add link to sources
'''ATTENTION!!'''
 
As of December 2013, the functionality of the Simplefonts module has been included into the ConTeXt core. You do no longer need to load any external module to take advantage of the simplified font commands. However, the commands have slightly changed:
 
`\setmainfont`
 
is now
 
`\definefontfamily [myfamily] [serif] [DejaVu]`
 
(and the same syntax to set the sans, mono and math font).
 
To use this family:
 
`\setupbodyfont [myfamily]`
 
Note that for monospace fonts, undesired ligatures may be used in `\type`. To avoid this, font features should be disabled:
 
`\definefontfamily [myfamily] [mono] [TeX Gyre Cursor] [features=none]`
 
If you want more examples, have a look at the file {{src|font-sel.mkvi}} in the distribution, which contains a good explanation.
 
-----
 
=== Introduction ===
for the heading of a chapter, section etc. E.g.
<context mode="mkiv" source="yes"texcode>
\definesimplefont[ChapterFont][Gentium Basic][size=24pt]
\setuphead[chapter][style=ChapterFont]
</contexttexcode>
but Wolfgang doesn’t recommend this command anymore (and removed it from the new, Oct. 2013 version) because you can get the same result with a custom typeface, e.g.
<context mode="mkiv" source="yes"texcode>\definesimplefonttypeface[chapterfont][Gentium BasicTeX Gyre Termes]
\definefont[ChapterFont][\classfont{chapterfont}{Serif} at 24pt]
\setuphead[chapter][style=ChapterFont]
</contexttexcode>
When you want to change only the global font for your document you
need the <code>\definesimplefonttypeface</code> command, e.g.
<context mode="mkiv" source="yes"texcode>\definesimplefonttypeface[documentfont][Gentium BasicTeX Gyre Termes]
\setupbodyfont[documentfont]
</contexttexcode>
=== Handling special cases ===

Navigation menu