Changes

Jump to navigation Jump to search
746 bytes added ,  19:02, 5 May 2014
Added links to the Fonts Manual.
'''Please, someone, fill this page !'''
'''This page is beeing regorganizedbeing reorganized'''
= Getting access Using [[LuaTeX]] as the processing engine in ConTeXt allows one to directly use fonts installed on the user's system . Instead of converting all fonts =into the standard <code>.tfm</code> and <code>.vf</code> formats (as outlined in some [[My Way]] documents<ref>[http://dl.contextgarden.net/websitesarchive/atl/tex/OpenType.pdf OpenType in ConTeXt] by Adam Lindsay</ref><ref>[http://dl.contextgarden.net/myway/expertfonts.pdf Installing Expert Fonts: Minion Pro] by Idris Samawi Hamid</ref>), LuaTeX creates these metric files automatically at run-time. This greatly simplifies font installation in ConTeXt.
= How LuaTeX can use non-TeX handles system fonts (in OpenType, TrueType or Type1 format) directly.=
The first time LuaTeX can use fonts in non-TeX format (e.g. OpenType, TrueType or Type1 format) directly. When ConTeXt processes a file that you runuses such non-traditional fonts, the actual fonts themselves are loaded in LuaTeX's embedded section of fontforge to extract their metric information. This removes the need for tfm and vf files on your disk, but it is also a somewhat lengthy and often memory-hungry process. Fortunately, the result of that internal preprocessing are also saved inside the texmf cache. Future runs using the same font (not just this file, but all files using that particular font) can then use the cached version of the metrics instead.
context myfile.tex on a file Mac OS users should note that uses such non-traditional fonts the current version of LuaTeX (which is probably always0.60), has severe problems dealing with the actual new TrueType collection fonts themselves have to be loaded in luatex's embedded section of fontforge to extract their metric informationSnow Leopard (Mac OS 10. This removes the need for tfm and vf files on your disk, but it is also a somewhat lengthy and often memory-hungry process6)That is why the results of that internal preprocessing are also saved inside the texmf cacheThe older Mac OS . Future runs using the same font (not just this file, but all files using that particular font) can then use the cached version of the metrics insteaddfont format works fine nowadays.
== Building the font database ==
You need to specify where the fonts should be looked for, by setting the <code>OSFONTDIR</code> environment variable. For instanceOn Windows,this might be achieved by running
set OSFONTDIR=c:/windows/fonts/
if the fonts should be found in <code>c:/windows/fonts/</code>; or. For Unix machines,
export OSFONTDIR="/usr/local/share/fonts;$HOME/.fonts"
if indicate that the fonts should be found in both <code>/usr/local/share/fonts</code> and <code>$HOME/.fonts</code>. The font database will then be automatically generated in the next run of <code>context</code>
The font database will then be automatically generated in the next run of <code>context</code>. You can also generate it manually by typing mtxrun --script font --reloador equally
mtxrun --script fonts --reload
MTXrun | fontnames: 3837 files read, 3342 normal and 49 extra entries added, 5 rejected, 3386 valid
If mtxrun has problem finding the mtx-fonts.lua file, it may be necessary to regenerate ConTeXt's file database: context --generate
== Querying the font database ==
The command
mtxrun --script fonts --list--all --pattern=*
will return the whole entries of the font database as a list, such as
You can query the database against a particular pattern. For instance,
mtxrun --script fonts --list --all --pattern=Delicious*
will return
deliciousbold Delicious-Bold /usr/local/share/fonts/d/delicious_bold.otf
MTX_FONTS_AUTOLOAD
to "no".
 
== Get a warning if the glyph is missing ==
 
You need to add the command <code>\checkcharactersinfont</code> or
(better) <code>\enabletrackers[fonts.missing]</code> in the preamble
of your document.
== References ==
[http://context.aanhet.net/svn/contextman/context-reference/en/co-fonts.pdf The new manual chapter on fonts]
= Using fonts =
Handling fonts in LuaTeX can be done* in a simple but limited way, using the <code>simplefonts<[http://pragma-ade.com/code> module;* in the standard way, using [[TypeScripts]general/manuals/mfonts.pdf Old Fonts Manual by Hans Hagen]
== With the <code>simplefonts<[http:/code> module ==/pragma-ade.com/general/manuals/fonts-mkiv.pdf New Fonts Manual by Hans Hagen]
[http://www.ctan.org/tex-archive/macros/context/contrib/context-simplefonts simplefonts] is a third-party module written by Wolfgang Schuster.
It simplifies the use of = Using fonts in LuaTeX by* freeing the user from writing or using [[TypeScripts]];* offering an interface similar to the [http://www.ctan.org/tex-archive/macros/xetex/latex/fontspec/ fontspec package for XeTeX]=
For instanceHandling fonts in LuaTeX can be done* in a simple but limited way, assuming using the [http://www.josbuivenga.demon.nl/delicious.html Delicious fonts] are properly installed and recognized by ConTeXt, you can simply write: [simplefonts|<texcodecode>\usemodule[simplefonts</code> module] % load ];* in the module\setmainfontstandard way, using [[DeliciousTypeScripts]] % set Delicious as main (serif) font \starttext\rm\tf roman \it italic \bf bold \bi bolditalic \sc smallcaps\stoptext</texcode>
== The standard way: Typescripts ==
<cmd>usetypescriptfile</cmd> is the preferred command because it takes care of the
<cmd>starttypescriptcollection</cmd>/<cmd>stoptypescriptcollection</cmd> environments.
 
=== Very simple example of typescript ===
 
If you are new to typescript you might have a look at this [[Simple Typescript Example]] to get a first idea how to use it.
=== Where to find existing typescripts ===
</texcode>
 
= References =
<references/>
[[Category:Fonts]]
[[Category:International]]
[[Category:LuaTeX]]
5

edits

Navigation menu