Changes

Jump to navigation Jump to search
m
minor adjustments, nothing new
<context source=yes>
\setupbodyfont[10pt]
 
\startbuffer[line]
The quick brown fox jumps over the lazy dog
\stopbuffer
\startlines
\normal{Upright: The quick brown fox \getbuffer[line]unknown}\italicbold{Bold: The quick brown fox \getbuffer[line]unknown}\bolditalic{Italic: The quick brown fox \getbuffer[line]unknown}\bolditalic{Bolditalic: The quick brown fox \getbuffer[line]unknown}
\stoplines
</context>
<context source=yes>
\setupbodyfont[pagella,10pt]
 
\startbuffer[line]
The quick brown fox jumps over the lazy dog
\stopbuffer
\startlines
\normal{Upright: The quick brown fox \getbuffer[line]unknown}\italicbold{Bold: The quick brown fox \getbuffer[line]unknown}\bolditalic{Italic: The quick brown fox \getbuffer[line]unknown}\bolditalic{Bolditalic: The quick brown fox \getbuffer[line]unknown}
\stoplines
</context>
; #1. With {{cmd|definefontfamily}}, give a name to the set of fonts you want to use, and indicate a first font.
:* Let's start with a Serif font, for which TeX practice is to refer to them as '''rm''' for Roman
:: <texcode>\definefontfamily[MyFontIdentifier][rm][familynameoftheseriffont]</texcode>
:* '''!!! WARNING !!!, ''', it's not the '''typescript name''' that we have to use, but the '''family name''' of the font
:** see under each [[ConTeXt distribution's Fonts|preview in the overview table]]
== Example ==
 
{{TwoColumnsUnderLevel1
|
This basic input is typeset with the default font, Latin Modern:
<context source=yes>
\setupbodyfont[12pt]
{  \setupbodyfont[7pt]\rm startbuffer[line]The quick brown fox jumps over the lazy dog}\stopbuffer \startbuffer[sample]\startTABLE \NC \type{\rmnormal} \NC \normal{\bf The quick brown fox jumps over the lazy doggetbuffer[line]} \NC \NR \NC \type{\rmitalic} \NC \italic{\it The quick brown fox jumps over the lazy doggetbuffer[line]} \NC \NR \NC \type{\bold} \NC \bold{\ss The quick brown fox jumps over the lazy doggetbuffer[line]} \NC \NR \NC \type{\ss\bf The quick brown fox jumps over the lazy dogbolditalic} \NC \bolditalic{\ssgetbuffer[line]} \it The quick brown fox jumps over the lazy dog}NC \NR\stopTABLE\stopbuffer \startlines\type{\tt The quick brown fox jumps over the lazy dogserif}\serif{\getbuffer[sample]} \type{\tt\bf The quick brown fox jumps over the lazy dogsans}\sans{\getbuffer[sample]} \type{\tt\it The quick brown fox jumps over the lazy dogmono}\mono{\getbuffer[sample]} \type{\math}Inline \math: ${x = \frac{y}{2z} + x_{\text{center}}$\}\stoplines
</context>
|
And let's view the difference with our new set of fonts:
<context source=yes>
\setupbodyfont[12pt]\definefontfamily [MyFontIdentifier] [rm] [texgyrepagella]\definefontfamily [MyFontIdentifier] [ss] [texgyreadventor]\definefontfamily [MyFontIdentifier] [tt] [texgyrecursor]\definefontfamily [MyFontIdentifier] [mm] [stixtwomath]\setupbodyfont[MyFontIdentifier, 7pt]{\rm startbuffer[line]The quick brown fox jumps over the lazy dog}\stopbuffer \startbuffer[sample]\startTABLE \NC \type{\rmnormal} \NC \normal{\bf The quick brown fox jumps over the lazy doggetbuffer[line]} \NC \NR \NC \type{\rmitalic} \NC \italic{\it The quick brown fox jumps over the lazy doggetbuffer[line]} \NC \NR \NC \type{\bold} \NC \bold{\ss The quick brown fox jumps over the lazy doggetbuffer[line]} \NC \NR \NC \type{\ss\bf The quick brown fox jumps over the lazy dogbolditalic} \NC \bolditalic{\ssgetbuffer[line]} \it The quick brown fox jumps over the lazy dog}NC \NR\stopTABLE\stopbuffer \startlines\type{\tt The quick brown fox jumps over the lazy dogserif}\serif{\getbuffer[sample]} \type{\tt\bf The quick brown fox jumps over the lazy dogsans}\sans{\getbuffer[sample]} \type{\tt\it The quick brown fox jumps over the lazy dogmono}\mono{\getbuffer[sample]} \type{\math}Inline \math: ${x = \frac{y}{2z} + x_{\text{center}}$\}\stoplines
</context>
}}
 
 
[[Category:Fonts]]

Navigation menu