Changes

Jump to navigation Jump to search
no edit summary
< [[XeTeX]] | [[Fonts]] >
Fonts get special treatment in [[XeTeX]]. By supporting a rich, within-TeX means of font specification, one avoids the usual difficulties associated with the TeX font mess: no dealing with map files, encodings, Karl Berry naming schemes, tfms, or virtual fonts. This page describes the various typescripts introduced with <tt>[[source:type-otf.tex|type-otf.tex]] (shared with LuaTeX, up-to-date) and [[source:type-xtx.tex|type-xtx</tt>. Common among all these typescripts is the Unicode encoding: <tt>[encoding=uctex]]</tt>(XeTeX specific - might need a revision).
<font color="red">Note that this functionality has been typescripts were slightly broken in ConTeXt versions later than after version 2007.01.xxand before 2007. See 09.28. Please update.Also, on Mac, old fonts that store their code in the message '''warning: XeTeX & broken typescripts resource fork (please wait with upgradingPostscript Type 1, Postscript Type 3)don''' t seem to work with xdvipdfmx. Using xdv2pdf instead of xdvipdfmx is possible with some tweaking.</font> <b>NB:</b> Major changes that need updates both on the ConTeXt mailing list.wiki and in type-xtx: * <code>encoding=uc</code> is made obsolete: no font encoding specification is needed any mode since only Unicode fontencoding is supported anyway* <code> XeTeX still works OK if you know how to overcome these problemsfeatures=default</code> will set tex-text option, but the interface will note that that file is not present in minimals yet* <code>[name:\typescripttwo\xetexcolon mapping=tex-text][encoding=uc]</code> should be synchronized with luaTeX and probably backported to XeTeX, so please be a bit patient untill later this year replaced by <code>[name:\typescripttwo][features=default]</code>* some others ...
==Quick start==
''(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:FontsOld Content]]

Navigation menu