Changes

Jump to navigation Jump to search
1,447 bytes added ,  23:09, 1 September 2020
m
< [[Basic Text Formatting]] | [[Fonts]] >
 
 
In ConTeXt there are four ways to switch fonts:
and then use <code>\important{important text}</code> in the text.
== Font styles and alternatives ==
There are three main types of font styles: serif, sans serif, and teletype. To
== Underline, strike through, and overline ==
* Underlined, struck, and overlined text can be achieved with {{cmd|overbar}} , {{cmd|overbars}}, {{cmd|overstrike}}, {{cmd|overstrikes}}, {{cmd|underbar}}, and {{cmd|underbars}}. The canonical way is <code>\overstrike{text}</code>. However, it you're using mycrotypography with <code>\setupalign[hz,hanging]</code> expect the rule to be placed over the character (with the Latin Modern fonts you should not have this problem, experienced with Linux Libertine and mkiv). This is not what is expected. The workaround is to put the overstriked text in a <code>\inframed[frame=off]{}</code>.  E.g.<texcode>bla bla bla \inframed[frame=off]{\overstrike{striked}} bla bla</texcode> <context>bla bla bla \inframed[frame=off]{\overstrike{striked}} bla bla</context> Disabling mycrotypography also works, but probably not desiderable. <pre>\setupalign[nothanging,nohz]\strikeout{text}\setupalign[hanging,hz]</pre>
== Complete font (bodyfont) change ==
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, use `\switchtobodyfont[times]` or `\swtichtobodyfont[palatino]`. Here `times` and `palatino` refer to the name of the typescript definitions for the font. ConTeXt distribution comes with some pre-defined typescripts; if you want to switch to another font, you need to define your own typescript. For details, see [[Fonts | the following articlespage on fonts]]. == From font-var.mkvi [https://source.contextgarden.net/tex/context/base/mkiv/font-var.mkvi?search=fontface#l49] == <context source=yes>% fontclass % modern dejavu% fontbody % ... 10pt 11pt 12pt ...% fontstyle % rm ss tt mm hw cg ...% fontalternative % tf bf sl it bs bi sc ...% fontsize % a b c d ...% fontface % 0=normal 1=text 2=script 3=scriptscript 4=x 5=xx (math are temporary) class: \fontclass body : \fontbody style: \fontstyle
alternative: \fontalternative
* [[Simple Typescript Example]]* [[Example with normal and condensed font variants]]* [[Linux Libertine on mkiv]]size: \fontsize
face: \fontface
</context>
[[Category:Fonts]]

Navigation menu