Changes

Jump to navigation Jump to search
no edit summary
=== Introduction ===-----
`simplefonts` is a third–party module written by Wolfgang Schuster.=== Warning ===
It has two main advantages over the standard The information on this page is outdated. See {{cmd|definefontfamily}} for details on a simpler font handling mechanism defined for ConTeXt MKIV. This remainder of this page is historical in nature and the examples may no longer work with recent ConTeXt:distributions.
* the user doesn’t need to write [[Fonts_in_LuaTeX#The_standard_way:_Typescripts|typescripts]].=== History ===
Wolfgang Schuster wrote a third–party module named `simplefonts`, which held a few advantages over standard ConTeXt font handling:
 
* the user doesn’t need to write [[Fonts_in_LuaTeX#The_standard_way:_Typescripts|typescripts]]; and
* the interface is much easier to use.
 
Major changes were released in October, 2013. As such, this page typically documents 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]Before October, 2013, installation of <code>simplefonts</code> is already for[[ConTeXt Standalone]] could be installed.like [[ConTeXt_Standalone#Installing_third_party_modules|any third-party module]]:
* If you’re running [[ConTeXt Standalone]] (which is a better option), <code>simplefonts</code> can be installed like [[ConTeXt_Standalone#Installing_third_party_modules|any third-party module]]:
first-setup.sh --modules="t-simplefonts"
 
For newer release of ConTeXt (or LuaTeX with [https://www.tug.org/texlive/ TeX Live]), <code>simplefonts</code> is installed by default, no additional installation steps are necessary.
==== Setting the system font directory ====
*`\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 ===
\stoptext
</context>
 
=== Legacy ===
 
As of December 2013, the Simplefonts module is included with ConTeXt. No longer is loading an external module necessary use simplified font commands. However, the commands have changed slightly:
 
`\setmainfont`
 
is now:
 
`\definefontfamily [myfamily] [serif] [DejaVu]`
 
which also applies to sans, mono, math fonts.
 
Use the font family as follows:
 
`\setupbodyfont [myfamily]`
 
Note: Monospace fonts may have undesired ligatures when using the `\type` command. Disable the ligature font features to avoid the issue as follows:
 
`\definefontfamily [myfamily] [mono] [TeX Gyre Cursor] [features=none]`
 
See {{src|font-sel.mkvi}} in the distribution for more examples and in depth explanation.
 
 
[[Category:Old Content]]

Navigation menu