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 ===
* the interface is much easier to use.
 
* Note that some major changes were released in Oct. 2013. Documentation on this page typically describes the earlier version of simplefonts distributed with TeX Live 2013, unless otherwise noted.
=== Installing <code>simplefonts</code> ===
* If you’re using LuaTeX along with [https://www.tug.org/texlive/ TeX Live], <code>simplefonts</code> is already installed.
* If you’re running [[ConTeXt Standalone]] (which is a better optionupdated more often, allowing use of newer features but with less stability testing), <code>simplefonts</code> can be installed like [[ConTeXt_Standalone#Installing_third_party_modules|any third-party module]]:
first-setup.sh --modules="t-simplefonts"
*`\definesimplefonttypeface`, defines a single typeface.
*`\simplefonttypeface`, can define a typeface set (such as serif, sans–serif, monospaced, caligraphy and others).
 
The \definesimplefont command can be used when you want a certain font
for the heading of a chapter, section etc. E.g.
 
<texcode>
\definesimplefont[ChapterFont][Gentium Basic][size=24pt]
\setuphead[chapter][style=ChapterFont]
</texcode>
 
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.
 
<texcode>
\definesimplefonttypeface[chapterfont][TeX Gyre Termes]
\definefont[ChapterFont][\classfont{chapterfont}{Serif} at 24pt]
\setuphead[chapter][style=ChapterFont]
</texcode>
 
When you want to change only the global font for your document you
need the <code>\definesimplefonttypeface</code> command, e.g.
 
<texcode>
\definesimplefonttypeface[documentfont][TeX Gyre Termes]
\setupbodyfont[documentfont]
</texcode>
=== Handling special cases ===

Navigation menu