Changes

Jump to navigation Jump to search
1,420 bytes removed ,  08:29, 2 July 2022
m
Text replacement - "pragma-ade.com" to "pragma-ade.nl"
'''Please, someone, fill this page !'''
'''This page is beeing regorganizedbeing reorganized'''
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 [[This Way - My Way#MyWay|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 handles system fonts =
You only have to do the reload manually when you have installed updates to already installed fonts that cause the font and/or file names to change.
This normally only happens for fonts that are still in development like [[TeX Gyre- Old Content]] and [[Latin Modern]].
You can rebuild the database manually, using the already-mentioned command
to "no".
== References Get a warning if the glyph is missing ==
You need to add the command <code>\checkcharactersinfont</code> or(better) <code>\enabletrackers[http://contextfonts.aanhet.netmissing]</svn/contextman/context-reference/en/co-fontscode> in the preambleof your document.pdf The new manual chapter on fonts]
= Using fonts =In LMTX the command {{cmd|replacemissingcharacters}} will insert boxes where missing characters are expected. The boxes adhere to font style (italics, bold) and copying the box from PDF into the text editor will insert the missing glyph, so one can see the missing character without looking at the ''missing characters'' section of the log file.
Handling fonts in LuaTeX can be done
* in a simple but limited way, using the <code>simplefonts</code> module;
* in the standard way, using [[TypeScripts]]
== With the <code>simplefonts</code> module References ==
[http://wwwcontext.ctanaanhet.orgnet/tex-archivesvn/macroscontextman/context-reference/contriben/context-simplefonts simplefonts] is a thirdco-party module written by Wolfgang Schuster. It simplifies the use of 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 instance, assuming the [http://www.josbuivenga.demon.nl/delicious.html Delicious pdf The new manual chapter on fonts] are properly installed and recognized by ConTeXt, you can simply write: <texcode>\usemodule[simplefonts] % load the module\setmainfont[Delicious] % set Delicious as main (serif) font
\starttext
\rm\tf roman \it italic \bf bold \bi bolditalic \sc smallcaps
\stoptext
</texcode>
=== Installing <code>simplefonts<[http:/code> ===/pragma-ade.nl/general/manuals/mfonts.pdf Old Fonts Manual by Hans Hagen]
* If you're using LuaTeX along with TeXlive 2009, <code>simplefonts</code> is already installed* If you're running [[ConTeXt Standalone]], <code>simplefonts</code> can be installed like [http://wikipragma-ade.contextgarden.netnl/general/manuals/ConTeXt_Standalone#Installing_third_party_modules any thirdfonts-party modulemkiv.pdf New Fonts Manual by Hans Hagen]: first-setup.sh --modules="t-simplefonts"
=== Handling special cases ===
If the font in question has an unusual naming scheme and is missing some features, it may be necessary to specify the names to look for and the font features to implement. In [http://archive.contextgarden.net/message/20111017.113829.e2b20bf4.en.html this example] the font names do not end with *bold and *regular but with *fett and *nor (from the german words "fett" for bold and "normal" for regular). Also the font doesn't provide an italic font face, so it has to be emulated.= Using fonts =
Wolfgang Schuster proposed Handling fonts in LuaTeX can be done* in a simple but limited way, using the following [http://archive.contextgarden.net/message/20111017.144952.1a72175c.en.html solutions]: [Simplefonts - Old Content|<texcodecode>\usemodule[simplefonts]  \definefontfeature[fakeitalic][default][slant=.25] % for fake bold use “stretch=<number/code> \setmainfont [telegroteskmodule]] ;[regularfont=* norin the standard way, italicfont=* nor, boldfont=* fett, bolditalicfont=* fett, italicfeatures=fakeitalic, % just the name of a fontfeature bolditalicfeatures=fakeitalicusing [[TypeScripts - Old Content]]</texcode>
== The standard way: Typescripts ==
\usetypefile[xx]
where ConTeXt prepends <code>type-</code> when it loads the file; but
<{{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 ===
=== Where to find existing typescripts ===
Each of the typescripts below defines a keyword to use with <{{cmd>|setupbodyfont</cmd>}}. Usually this is the same as the name of the typescript, but there is one exception (<code>antykwa-torunska</code>)
* Latin Modern (typescript name: <code>modern</code>; this is the default font set)
* Latin Modern variant (ts name: <code>modernvariable</code>; LM variable typewriter for serif)
* Postscript (ts name: <code>postscript</code>; Termes for serif, Heros for sans, Cursor for mono)
* Antykwa Toruńska (ts name: <code>antykwa-torunska</code>; only serif; defines <tt>antykwa</tt> as keyword for <{{cmd>|setupbodyfont</cmd>}})
* Iwona (ts name: <code>iwona</code>; only sans serif)
* Iwona Light, Medium and Heavy (ts names: <code>iwona-light</code>, <code>iwona-medium</code>, <code>iwona-heavy</code>; only sans; the medium variant is a small bit heavier than a "regular" one)
That's as simple as using a traditional ConTeXt typescript!
But ... how is it any different, then? Well, the difference is that in Mark IV, we can use an Opentype font directly, so that what is done here: when we want to use Palatino, the [[TeX Gyre- Old Content]] equivalent (“Pagella”) is called and we can use its Opentype “features”; read on.
==== Opentype features ====
[[Category:Fonts]]
[[Category:International]]
[[Category:LuaTeX]]

Navigation menu