Open main menu

Changes

some temporary definitions to use TeX Gyre in XeTeX
<b>This is only temporary (soon to be obsolete) information</b> for those who would like to try out/test the TeX Gyre fonts with XeTeX. The [modified?] definitions should be moved to the ConTeXt core one day.

You need the following additional definitions either in type-gyr.tex or in some other file that you include in your file:

Just to be complete:
<texcode>
\definetypescriptprefix [n:adventor] [TeXGyreAdventor] % gothic URW Gothic L
\definetypescriptprefix [n:bonum] [TeXGyreBonum] % bookman URW Bookman L
\definetypescriptprefix [n:chorus] [TeXGyreChorus] % chancery URW Chancery L
\definetypescriptprefix [n:cursor] [TeXGyreCursor] % curier Nimbus Mono L
\definetypescriptprefix [n:heros] [TeXGyreHeros] % helvetica Nimbus Sans L
\definetypescriptprefix [n:pagella] [TeXGyrePagella] % palatino URW Palladio L
\definetypescriptprefix [n:schola] [TeXGyreSchola] % schoolbook Century Schoolbook L
\definetypescriptprefix [n:termes] [TeXGyreTermes] % times Nimbus Roman No9 L

\definetypescriptprefix [f:adventor] [ag]
\definetypescriptprefix [f:bonum] [bk]
\definetypescriptprefix [f:chorus] [zc]
\definetypescriptprefix [f:cursor] [cr]
\definetypescriptprefix [f:heros] [hv]
\definetypescriptprefix [f:pagella] [pl]
\definetypescriptprefix [f:schola] [cs]
\definetypescriptprefix [f:termes] [tm]
</texcode>

You really need those:
<texcode>
\starttypescript [serif] [pagella,termes,bonum,schola] [uc]
% I need to check which ones are not the "serif" fonts and remove those from here
% Not all the mentioned fonts are available yet
%\starttypescript [serif] [adventor,bonum,chorus,cursor,heros,pagella,schola,termes] [uc]

% this assumes that the fonts are placed in TEXMF tree
% alternatively one can have the fonts installed on the system (slightly different definitions are needed for that)
\definefontsynonym [\typescriptprefix{n:\typescripttwo}-Regular] [file:texgyre\typescripttwo-regular] [encoding=\typescriptthree]
\definefontsynonym [\typescriptprefix{n:\typescripttwo}-Italic] [file:texgyre\typescripttwo-italic] [encoding=\typescriptthree]
\definefontsynonym [\typescriptprefix{n:\typescripttwo}-Bold] [file:texgyre\typescripttwo-bold] [encoding=\typescriptthree]
\definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldItalic] [file:texgyre\typescripttwo-bolditalic] [encoding=\typescriptthree]

% this block is wrong and should be fixed
\definefontsynonym [\typescriptprefix{n:\typescripttwo}-Caps] [\typescriptprefix{n:\typescripttwo}-Regular]
\definefontsynonym [\typescriptprefix{n:\typescripttwo}-ItalicCaps] [\typescriptprefix{n:\typescripttwo}-Italic]
\definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldCaps] [\typescriptprefix{n:\typescripttwo}-Bold]
\definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldItalicCaps] [\typescriptprefix{n:\typescripttwo}-BoldItalic]

\definefontsynonym [\typescriptprefix{n:\typescripttwo}-Slanted] [\typescriptprefix{n:\typescripttwo}-Italic]
\definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldSlanted] [\typescriptprefix{n:\typescripttwo}-BoldItalic]
\stoptypescript
</texcode>

And then you might also want to override times:

<texcode>
\starttypescript [serif] [times] [uc]
\definefontsynonym [Times-Roman] [TeXGyreTermes-Regular] [encoding=\typescriptthree]
\definefontsynonym [Times-Italic] [TeXGyreTermes-Italic] [encoding=\typescriptthree]
\definefontsynonym [Times-Bold] [TeXGyreTermes-Bold] [encoding=\typescriptthree]
\definefontsynonym [Times-BoldItalic] [TeXGyreTermes-BoldItalic] [encoding=\typescriptthree]
\definefontsynonym [Times-Caps] [TeXGyreTermes-Caps] [encoding=\typescriptthree]

\definefontsynonym [Times-Slanted] [Times-Italic]
\definefontsynonym [Times-BoldSlanted] [Times-BoldItalic]
\stoptypescript
</texcode>

The same code doesn't work with pdfTeX, so it might be that the definitions above are slightly wrong/could be improved.


Then you can use:
<texcode>
\definetypeface[times][rm][serif][termes][default][encoding=uc]
\setupbodyfont[times,12pt]
</texcode>