Changes

Jump to navigation Jump to search
465 bytes removed ,  21:24, 14 May 2015
m
no edit summary
* a complete font change ({{cmd|setupbodyfont}}, {{cmd|switchtobodyfont}}).
== Warning Warnings ==
1. Placing a font switch at the begin of a paragraph can sometimesgenerate unexpected side-effects. This can be avoided by forcinghorizontal mode before any font change:
<texcode>
\dontleavehmode{\bf Warning!} Care must be taken when a font switch is usedat the beginning of a paragraph.\par
</texcode>
 
2. It is usually a bad style to use explicit font switches in the text. It is better to define a semantic command that takes care of the font switching. For example, instead of using <code>{\bf\red important text}</code>
<texcode>
\definehighlight[important][style=bold, color=red]
</texcode>
and then use <code>\important{important text}</code> in the text.
== Font styles and alternatives ==
{{cmd|switchtobodyfont}} can be localized within a group as usual.
== Different Switching typefaces ==
So far we have discussed style and size changes within a given typeface
family. If you want to use a different typeface altogether, such as Times or
Palatino, see the Pragma web site has recipes covering all the commonly availabletypefaces [http://pragma-ade.com/general/manuals/showfont.pdf], while aseparate manual describes how to write support for new typefaces[http://pragma-ade.com/general/manuals/mfonts.pdf]following articles.
The recipes as given work with the standalone ConTeXt distribution, but not
with TeX Live et al. [http://pragma-ade.com/general/technotes/tfmetrics.pdf]
explains why ConText uses separate font metrics, and gives some differences
between the sets. To use the recipes with other distributions,
try adding one of <code>\usetypescript[berry][ec]</code> or
<code>\usetypescript[adobekb][ec]</code>.
* [[Simple Typescript Example]]
* [[Linux Libertine on mkiv]]
== Conclusion ==
There are many other ways of choosing font styles in ConTeXt. If these
basic styles do not satisfy your needs, have a look at the [[Manuals|manuals]],
or ask on the [[ConTeXt Mailing Lists]].
[[Category:Fonts]]

Navigation menu