Changes

Jump to navigation Jump to search
using PostScript fonts
''(An image will be put here as soon as XeTeX will be enabled on contextgarden.)''
 
==Using PostScript fonts==
 
Note: It's '''not''' possible to use oldfashioned Mac resource fork fonts (where you have a "suitcase" with screen fonts) with ConTeXt!
 
This example uses PostScript fonts installed in the texmf tree:
 
<texcode>
\starttypescript [sans] [urw-grotesk]
% PostScript name file name instead of an encoding
\definefontsynonym [URWGroteskT-LighNarr] [file:u004242t] [features=default]
\definefontsynonym [URWGroteskT-MediNarr] [file:u004244t] [features=default]
\definefontsynonym [URWGroteskT-LighNarrObli] [file:u004262t] [features=default]
\definefontsynonym [URWGroteskT-MediNarrObli] [file:u004264t] [features=default]
\stoptypescript
 
\starttypescript [sans] [urw-grotesk]
\definefontsynonym [Sans] [URWGroteskT-LighNarr]
\definefontsynonym [SansItalic] [URWGroteskT-LighNarrObli]
\definefontsynonym [SansBold] [URWGroteskT-MediNarr]
\definefontsynonym [SansBoldItalic] [URWGroteskT-MediNarrObli]
\definefontsynonym [SansSlanted] [SansItalic]
\definefontsynonym [SansBoldSlanted] [SansBoldItalic]
\stoptypescript
 
\starttypescript [my] [urw-grotesk]
% \definetypeface [urw-grotesk] [rm] [serif] [schola] [default]
\definetypeface [urw-grotesk] [ss] [sans] [urw-grotesk] [default] [encoding=uc]
\stoptypescript
 
\usetypescript [my][urw-grotesk]
\setupbodyfont [urw-grotesk,ss,8pt]
 
</texcode>
 
If you'd like to use active (OS-installed) fonts, replace "file:filename" with "name:public name" like this:
 
<texcode>
\definefontsynonym [Eco-Regular] [name:Eco101Roman] [features=default]
\definefontsynonym [Eco-Bold] [name:Eco301Bold] [features=default]
\definefontsynonym [Eco-Italic] [name:Eco102Italic] [features=default]
\definefontsynonym [Eco-BoldItalic] [name:Eco302BoldItalic] [features=default]
</texcode>
 
(Sample from [[http://archive.contextgarden.net/message/20080120.125423.babb9aea.en.html this thread]].)
[[Category:Fonts]]

Navigation menu