Difference between revisions of "Old: A Beginner's Guide to Using Fonts in Mark IV"

From Wiki
Jump to navigation Jump to search
m (added links)
(Added description on how to compose your own typescript.)
Line 32: Line 32:
  
 
The first line seems to order ConTeXt to "install" (for the current file) the given typescript (it accepts what I have earlier called a "typescript name").  The last one starts using it (you may omit the size if you are satisfied with the default).
 
The first line seems to order ConTeXt to "install" (for the current file) the given typescript (it accepts what I have earlier called a "typescript name").  The last one starts using it (you may omit the size if you are satisfied with the default).
 +
 +
== Combining predefined fonts in your own typescripts ==
 +
 +
It is also possible to combine fonts from the TeX Gyre collection in your own typescripts. The example below combines Bonum (Bookman) roman, Adventor (AvantGarde) for sans serif, Cursor (Courier) for teletype, and Euler for math.
 +
 +
<texcode>
 +
\starttypescript [Bonum]
 +
    \definetypeface [Bonum] [rm] [serif] [bonum]    [default]
 +
    \definetypeface [Bonum] [ss] [sans]  [adventor]  [default]
 +
    \definetypeface [Bonum] [tt] [mono]  [cursor]    [default]
 +
    \definetypeface [Bonum] [mm] [math]  [euler]    [default]
 +
    \quittypescriptscanning
 +
\stoptypescript
 +
 +
\usetypescript[Bonum]
 +
\setupbodyfont[Bonum,12pt]
 +
 +
\starttext
 +
Hello world, I'm Bonum!
 +
\stoptext
 +
</texcode>
  
 
== Example typescripts ==
 
== Example typescripts ==
  
 
* [[CD_Booklet#Use_Delicious_OTF_font_with_luatex_.2F_mkiv|exljbris Delicious]]
 
* [[CD_Booklet#Use_Delicious_OTF_font_with_luatex_.2F_mkiv|exljbris Delicious]]

Revision as of 07:23, 16 April 2009

< Fonts | TypeScripts >

This page tries to describe how to use preinstalled (with the ConTeXt Minimals) typescripts with ConTeXt MkIV. It does not explain how this works; for this, consult the new manual chapter on fonts or documents cited in Fonts. (These things are not easy. You have been warned!)

Note that this page is in preparation---these things are difficult and I don't understand them fully. Some of the fonts mentioned below don't work for me; I hope to clear this soon.

I assume here that we have a working ConTeXt Mark IV installation, for example ConTeXt Minimals. In particular, we have LM fonts, the TeX Gyre collection and some other ones.

Available typescripts

Each of the typescripts below defines a keyword to use with \setupbodyfont. Usually this is the same as the name of the typescript, but there is one exception (antykwa-torunska)

  • Latin Modern (typescript name: modern; this is the default font set)
  • Latin Modern variant (ts name: modernvariable; LM variable typewriter for serif)
  • Postscript (ts name: postscript; Termes for serif, Heros for sans, Cursor for mono)
  • Antykwa Toruńska (ts name: antykwa-torunska; only serif; defines antykwa as keyword for \setupbodyfont)
  • Iwona (ts name: iwona; only sans serif)
  • Iwona Light, Medium and Heavy (ts names: iwona-light, iwona-medium, iwona-heavy; only sans; the medium variant is a small bit heavier than a "regular" one)
  • Pagella (ts name: palatino; only serif)
  • Termes (ts name: times; only serif, Heros for sans)

Usage example

\usetypescript[palatino]
\setupbodyfont[palatino,18pt]

\starttext
Hello world, I'm Pagella!
\stoptext

The first line seems to order ConTeXt to "install" (for the current file) the given typescript (it accepts what I have earlier called a "typescript name"). The last one starts using it (you may omit the size if you are satisfied with the default).

Combining predefined fonts in your own typescripts

It is also possible to combine fonts from the TeX Gyre collection in your own typescripts. The example below combines Bonum (Bookman) roman, Adventor (AvantGarde) for sans serif, Cursor (Courier) for teletype, and Euler for math.

\starttypescript [Bonum]
    \definetypeface [Bonum] [rm] [serif] [bonum]     [default]
    \definetypeface [Bonum] [ss] [sans]  [adventor]  [default]
    \definetypeface [Bonum] [tt] [mono]  [cursor]    [default]
    \definetypeface [Bonum] [mm] [math]  [euler]     [default]
    \quittypescriptscanning
\stoptypescript

\usetypescript[Bonum]
\setupbodyfont[Bonum,12pt]

\starttext
Hello world, I'm Bonum!
\stoptext

Example typescripts