[NTG-context] mkii to mkiv, setting the fonts for my project

Wolfgang Schuster schuster.wolfgang at gmail.com
Sun Mar 1 12:03:14 CET 2015


> Am 01.03.2015 um 11:20 schrieb Gerben Wierda <gerben.wierda at rna.nl>:
> 
> I’m trying to get my project from mkii to mkiv. I’m running into a font issue. I’m using the Optima font from OS X on the Mac. My current setup is as added below.  Can someone tell me how to do that in mkiv?
> 
> \usetypescript[serif,sans,mono] [hanging] [normal]
> \starttypescript [sans,serif] [optima] [texnansi,ec]
> \definefontsynonym [Optima-Regular] [\typescriptthree-OptimaRegular]
> [encoding=\typescriptthree]
> \definefontsynonym [Optima-Italic] [\typescriptthree-OptimaItalic]
> [encoding=\typescriptthree]
> \definefontsynonym [Optima-Bold] [\typescriptthree-OptimaBold]
> [encoding=\typescriptthree]
> \definefontsynonym [Optima-BoldItalic] [\typescriptthree-OptimaBoldItalic]
> [encoding=\typescriptthree]
> \definefontsynonym [Optima-ExtraBlack] [\typescriptthree-OptimaExtraBlack]
> [encoding=\typescriptthree]
> \stoptypescript
> \starttypescript [sans,serif] [optima] [name]
> \setups            [font:fallback:\typescriptone]
> \definefontsynonym [\typescriptprefix\typescriptone] [Optima-Regular]
> \definefontsynonym [\typescriptprefix\typescriptone Italic] [Optima-Italic]
> \definefontsynonym [\typescriptprefix\typescriptone Bold]       [Optima-Bold]
> \definefontsynonym [\typescriptprefix\typescriptone BoldItalic]
> [Optima-BoldItalic]
> \definefontsynonym [\typescriptprefix\typescriptone Black] [Optima-ExtraBlack]
> \stoptypescript
> \definetypeface[allsans][rm][serif][optima][default][encoding=texnansi]
> \definetypeface[allsans][ss][sans][optima][default][encoding=texnansi]
> \loadmapfile [gtamacfonts.map]
> \setupbodyfont[allsans,10pt]
> 
> In gtamacfonts.map, I find:
> 
> % Optima
> 
> ec-raw-OptimaRegular Optima-Regular 4 <OptimaRegular.ttf ec.enc
> ec-raw-OptimaBold Optima-Bold 4 <OptimaBold.ttf ec.enc
> ec-raw-OptimaBoldItalic Optima-BoldItalic 4 <OptimaBoldItalic.ttf ec.enc
> ec-raw-OptimaExtraBlack Optima-ExtraBlack 4 <OptimaExtraBlack.ttf ec.enc
> ec-raw-OptimaItalic Optima-Italic 4 <OptimaItalic.ttf ec.enc
> 
> ts1-OptimaRegular Optima-Regular 4 <OptimaRegular.ttf lm-ts1.enc
> ts1-OptimaBold Optima-Bold 4 <OptimaBold.ttf lm-ts1.enc
> ts1-OptimaBoldItalic Optima-BoldItalic 4 <OptimaBoldItalic.ttf lm-ts1.enc
> ts1-OptimaExtraBlack Optima-ExtraBlack 4 <OptimaExtraBlack.ttf lm-ts1.enc
> ts1-OptimaItalic Optima-Italic 4 <OptimaItalic.ttf lm-ts1.enc
> ts1-OptimaRegular Optima-Regular 4 <OptimaRegular.ttf lm-ts1.enc
> 
> texnansi-OptimaBold Optima-Bold 4 < OptimaBold.ttf texnansi.enc
> texnansi-OptimaBoldItalic Optima-BoldItalic 4 < OptimaBoldItalic.ttf texnansi.enc
> texnansi-OptimaExtraBlack Optima-ExtraBlack 4 < OptimaExtraBlack.ttf texnansi.enc
> texnansi-OptimaItalic Optima-Italic 4 < OptimaItalic.ttf texnansi.enc
> texnansi-OptimaRegular Optima-Regular 4 < OptimaRegular.ttf texnansi.enc


There is no need for a serif font in your document but you should always set a math font.

\starttypescript [sans] [optima]
	\setups[font:fallback:sans]
	\definefontsynonym [Sans]           [file:optima.ttc(Optima Regular)]
	\definefontsynonym [SansItalic]     [file:optima.ttc(Optima Italic)]
	\definefontsynonym [SansBold]       [file:optima.ttc(Optima Bold)]
	\definefontsynonym [SansBoldItalic] [file:optima.ttc(Optima Bold Italic)]
\stoptypescript

\definetypeface [optima] [ss] [sans] [optima] [default] [features=default]
\definetypeface [optima] [mm] [math] [modern] [default]

\setupbodyfont[optima,10pt]

\starttext
Optima {\it Optima} {\bf Optima} {\bi Optima}
\stoptext

Wolfgang


More information about the ntg-context mailing list