type-imp-xits.mkiv /size: 3782 b    last modification: 2023-12-21 09:44
1%D \module
2%D   [       file=type-imp-hvmath,
3%D        version=2007.07.30,
4%D          title=\CONTEXT\ Typescript Macros,
5%D       subtitle=Xits,
6%D         author=Khaled Hosny \& Hans Hagen,
7%D           date=\currentdate,
8%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9%C
10%C This module is part of the \CONTEXT\ macro||package and is
11%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12%C details.
13
14% This one makes more sense than Stix. Xits uses the glyph collection from stix
15% but packages it in a proper OpenType Math font. From the Stix site:  Version 1.1,
16% which will include fonts packaged for use with Microsoft Office applications, is
17% scheduled for release by the end of 2010. Version 1.2, which will include Type 1
18% fonts for use with LaTeX, will follow in 2011. So, we are on our own anyway.
19
20% In \MKXL\ (aka LMTX) we now use StixTwo because Xits is frozen and not maintained
21% any longer. The obsolete LR2 and R2L variants are just ignored because in \LMTX\
22% all math fonts have bidi support injected for which we use a companion font that is
23% derived from Xits.
24
25\definefontfeature[xitsmath][copymathscripts=yes] % see lfg file
26
27\loadtypescriptfile[texgyre]
28
29\starttypescriptcollection[xits]
30
31    \starttypescript [\s!math] [xits,xitsbidi] [\s!name]
32        \loadfontgoodies[xits-math]
33        \definefontsynonym[\s!MathRoman        ][\s!file:xitsmath-regular.otf] [\s!features={\s!math\mathsizesuffix    ,mathextra,xitsmath},\s!goodies=xits-math]
34        \definefontsynonym[\s!MathRoman     L2R][\s!file:xitsmath-regular.otf] [\s!features={\s!math\mathsizesuffix-l2r,mathextra,xitsmath},\s!goodies=xits-math]
35        \definefontsynonym[\s!MathRoman     R2L][\s!file:xitsmath-regular.otf] [\s!features={\s!math\mathsizesuffix-r2l,mathextra,xitsmath},\s!goodies=xits-math]
36        \definefontsynonym[\s!MathRomanBold    ][\s!file:xitsmath-bold.otf]    [\s!features={\s!math\mathsizesuffix    ,mathextra,xitsmath},\s!goodies=xits-math]
37        \definefontsynonym[\s!MathRomanBold L2R][\s!file:xitsmath-bold.otf]    [\s!features={\s!math\mathsizesuffix-l2r,mathextra,xitsmath},\s!goodies=xits-math]
38        \definefontsynonym[\s!MathRomanBold R2L][\s!file:xitsmath-bold.otf]    [\s!features={\s!math\mathsizesuffix-r2l,mathextra,xitsmath},\s!goodies=xits-math]
39    \stoptypescript
40
41    \starttypescript [\s!serif] [xits] [\s!name]
42        \setups[\s!font:\s!fallback:\s!serif]
43        \definefontsynonym[\s!Serif]          [\s!file:xits-regular.otf]    [\s!features=\s!default]
44        \definefontsynonym[\s!SerifBold]      [\s!file:xits-bold.otf]       [\s!features=\s!default]
45        \definefontsynonym[\s!SerifItalic]    [\s!file:xits-italic.otf]     [\s!features=\s!default]
46        \definefontsynonym[\s!SerifBoldItalic][\s!file:xits-bolditalic.otf] [\s!features=\s!default]
47    \stoptypescript
48
49    \starttypescript[xits]
50        \definetypeface [xits] [\s!rm] [\s!serif] [xits]   [\s!default]
51        \definetypeface [xits] [\s!ss] [\s!sans]  [heros]  [\s!default] [\s!rscale=0.9]
52        \definetypeface [xits] [\s!tt] [\s!mono]  [modern] [\s!default] [\s!rscale=1.05]
53        \definetypeface [xits] [\s!mm] [\s!math]  [xits]   [\s!default]
54    \stoptypescript
55
56    % for the moment
57
58    \starttypescript[xitsbidi]
59        \definetypeface [xitsbidi] [\s!rm] [\s!serif] [xits]     [\s!default]
60        \definetypeface [xitsbidi] [\s!ss] [\s!sans]  [heros]    [\s!default] [\s!rscale=0.9]
61        \definetypeface [xitsbidi] [\s!tt] [\s!mono]  [modern]   [\s!default] [\s!rscale=1.05]
62        %definetypeface [xitsbidi] [\s!mm] [\s!math]  [xitsbidi] [bidi]       [\s!direction=\s!both]
63        \definetypeface [xitsbidi] [\s!mm] [\s!math]  [xitsbidi] [\s!default] [\s!direction=\s!both]
64    \stoptypescript
65
66\stoptypescriptcollection
67
68