Changes

Jump to navigation Jump to search
1,579 bytes added ,  17:02, 25 September 2023
m
added informations about the ConTeXt font cache
;3. Check by looking for the specific font you want to use next. A common example:
<texcode>mtxrun --script fonts --list --all --pattern='*helvetica*'</texcode>
 
NOTE:In recent versions of ConTeXt (2023), the use of wildcards is no longer necessary to check for the presence of a particular font.
 
In addition, it is no longer necessary to tell ConTeXt where the fonts are located (on Windows or Apple Mac), as a routine has been implemented in <texcode>mtxrun.lua</texcode> that automates the font search. If no value for OSFONTDIR is set, then <texcode>mtxrun.lua</texcode>. Here is the code of <texcode>mtxrun.lua</texcode> (given here as information) :
 
<texcode>
do
local osfontdir=osgetenv("OSFONTDIR")
if osfontdir and osfontdir~="" then
elseif osname=="windows" then
ossetenv("OSFONTDIR","c:/windows/fonts//")
elseif osname=="macosx" then
ossetenv("OSFONTDIR","$HOME/Library/Fonts//;/Library/Fonts//;/System/Library/Fonts//")
end
end
</texcode>
 
On the other hand, if the routine seeks to locate fonts on Windows and Mac, insofar as we are seeking to install new fonts for the Linux system, we must ask ConTeXt — as indicated above — for the path that leads to the directory where the new fonts are deposited (in this case <texcode>tex/texmf-fonts/fonts/</texcode>). Then you'll need to empty the font cache and regenerate it, so that the <texcode>mtxrun --script fonts --list --all --pattern=didot</texcode> command can return something (if you've installed a GFS Didot, or Theano Didot font, for example).
 
To empty the cache and regenerate it, enter the following command (in <texcode>/home/johndoe/context/tex/texmf-linux64/bin</texcode>):
<texcode>mtxrun --script cache --erase && mtxrun --generate</texcode>
 
 
 
 
 
Now, let's learn how to use them for typesetting.
48

edits

Navigation menu