Changes

Jump to navigation Jump to search
714 bytes added ,  20:30, 31 May 2020
= How to use my new font : 6 steps, 5 minutes =
Let's take a example, we want to use [https://fonts.google.com/specimen/Noto+Serif Noto Serif].
:* the fonts database: <code>mtxrun --script font --reload</code>
; #4. Find how are called Check if the 4 styles for files are identified by ConTeXtnow:
:* <code>mtxrun --script font --list --file -pattern=*noto*</code>
; #5. Define them as a new typescript (ConTeXt vocabulary)in your input file.
:* Use the commands {{cmd|starttypescript}} and {{cmd|definefontsynonym}} to declare
\definefontfamily [MyFontIdentifier] [rm] [notoserif]
</texcode>
 
 
Finally, we shoud have:
 
<texcode>
\starttypescript [serif] [notoserif]
\definefontsynonym[NotoSerif-Regular] [file:NotoSerif-Regular]
\definefontsynonym[NotoSerif-Italic] [file:NotoSerif-Italic]
\definefontsynonym[NotoSerif-Bold] [file:NotoSerif-Bold]
\definefontsynonym[NotoSerif-BoldItalic] [file:NotoSerif-BoldItalic]
\stoptypescript
 
\definefontfamily [MyFontIdentifier] [rm] [notoserif]
 
\setupbodyfont[MyFontIdentifier]
\setupbodyfont[12pt]
{\rm The quick brown fox jumps over the lazy dog}\\
{\rm\bf The quick brown fox jumps over the lazy dog}\\
{\rm\it The quick brown fox jumps over the lazy dog}\\
</texcode>
 
{{todo|naming conventions for definefontssymonym ?}}
{{todo:How to use font from your system.}}

Navigation menu