[NTG-context] Project structure, (simple)font woes

Wolfgang Schuster schuster.wolfgang at googlemail.com
Mon Apr 16 13:19:21 CEST 2012


Am 16.04.2012 um 13:03 schrieb Mari Voipio:

> Hello all,
> 
> I'm trying to teach myself to use the project structure. After a few
> rounds of trial and error (...and stupid naming schemes...) I'm almost
> there, but got stuck at my font setups.
> 
> 
> If I do this as a single file, it works fine (Win7 and newest ConTeXt,
> updated it this morning):
> 
> % FONT related setups
> \usemodule[simplefonts] % to get access to Calibri & Cambria, win ttf fonts
> 
> \starttypescript[Manuals]
>    \definetypeface[Manuals] [rm] [serif] [cambria] [default] [rscale=0.95]
>    \definetypeface[Manuals] [ss] [sans] [calibri] [default] [rscale=0.9]
> \stoptypescript

You load the simplefonts module but you don’t use it, instead you try to define a typescript the old.

This can work when your Cambria and Calibri fonts have names with the following system: CAMBRIA.ttf, CAMBRIAI.TTF etc.

When you want to use simplefonts to load the font you have to change your environment file to this:

\startenvironment env-fonts-simplefonts

\usemodule[simplefonts] % to get access to Calibri & Cambria, win ttf fonts

\setmainfont[Cambria]
\setsansfont[Calibri]

\setupbodyfont[10pt,sans]

\stopenvironment

BTW: I can give a talk about typescripts and font loading at the next conference when there is interest in this.

Wolfgang


More information about the ntg-context mailing list