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

From Wiki
Jump to navigation Jump to search
m
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
< [[Fonts]] | [[TypeScripts]] >
 
< [[Fonts]] | [[TypeScripts]] >
  
This page tries to describe how to use preinstalled (with the [[ConTeXt Minimals]]) typescripts with [[Mark IV|ConTeXt MkIV]].  It does ''not'' explain how this works; for this, consult [http://context.aanhet.net/svn/contextman/context-reference/en/co-fonts.pdf the new manual chapter on fonts] or documents cited in [[Fonts]].  (These things are not easy.  You have been warned!)
+
= Introduction =
  
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.
+
This page describes how to use fonts (typescripts) with [[Mark IV|ConTeXt MkIV]] (such as ConTeXt Standalone). For a deeper understanding consult the [http://context.aanhet.net/svn/contextman/context-reference/en/co-fonts.pdf manual on fonts] or documents cited on the [[Fonts]] page (be warned: understanding how fonts work is not easy).
  
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.
+
Note that fonts are difficult and some examples on this page do not work. In particular, LM fonts and the TeX Gyre collection.
  
== Available typescripts ==
+
= Available 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>)
+
Each typescript below defines a keyword to use with {{cmd|setupbodyfont}}. 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 (typescript name: <code>modern</code>; this is the default font set)
 
* Latin Modern variant (ts name: <code>modernvariable</code>; LM variable typewriter for serif)
 
* 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)
 
* 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>)
+
* Antykwa Toruńska (ts name: <code>antykwa-torunska</code>; only serif; defines <tt>antykwa</tt> as keyword for {{cmd|setupbodyfont}})
 
* Iwona (ts name: <code>iwona</code>; only sans serif)
 
* 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)
 
* 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)

Revision as of 00:01, 23 September 2013

< Fonts | TypeScripts >

Introduction

This page describes how to use fonts (typescripts) with ConTeXt MkIV (such as ConTeXt Standalone). For a deeper understanding consult the manual on fonts or documents cited on the Fonts page (be warned: understanding how fonts work is not easy).

Note that fonts are difficult and some examples on this page do not work. In particular, LM fonts and the TeX Gyre collection.

Available Typescripts

Each typescript 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. The rscale=... option ensures that all fonts have the same x-height. (You can lookup the relative x-heigt of a font using fontforge.)

\starttypescript [Bonum]
    \definetypeface [Bonum] [rm] [serif] [bonum]     [default]
    \definetypeface [Bonum] [ss] [sans]  [adventor]  [default] [rscale=0.887]
    \definetypeface [Bonum] [tt] [mono]  [cursor]    [default] [rscale=1.163]
    \definetypeface [Bonum] [mm] [math]  [euler]     [default] [rscale=1.050]
\stoptypescript

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

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

Example typescripts