summaryrefslogtreecommitdiff
path: root/tex/context/base/type-imp-unfonts.mkiv
blob: 2e1ca6c307a94dc21ca23097c5bc5afaa58f8a8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
%D \module
%D   [       file=type-imp-unfonts,
%D        version=2012.03.11,
%D          title=\CONTEXT\ Typescript Macros,
%D       subtitle=UnFonts,
%D         author=...,
%D           date=\currentdate,
%D      copyright=...]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\loadtypescriptfile[texgyre]
\loadtypescriptfile[xits]

\definefontfeature
  [kr-default]
  [mode=node,script=hang,lang=kor]

\definefontfeature
  [kr-slanted]
  [mode=node,script=hang,lang=kor,slant=.2]

\definefontfeature
  [kr-latin-default]
  [default]

\definefontfeature
  [kr-latin-slanted]
  [krlatindefault]
  [slant=.2]

\definefontfeature
  [kr-latin-slanted-mono]
  [slant=.2]

\definefontfeature
  [kr-latin-smallcaps]
  [krlatindefault]
  [smcp=yes]

\definefontfeature
  [kr-latin-smallcaps-mono]
  [cmcp=yes]

\definefontfallback[kr-serif]           [texgyrepagella-regular*kr-latin-default]      [0x0000-0x0400][force=yes]
\definefontfallback[kr-serifbold]       [texgyrepagella-bold*kr-latin-default]         [0x0000-0x0400][force=yes]
\definefontfallback[kr-serifitalic]     [texgyrepagella-italic*kr-latin-default]       [0x0000-0x0400][force=yes]
\definefontfallback[kr-serifbolditalic] [texgyrepagella-bolditalic*kr-latin-default]   [0x0000-0x0400][force=yes]
\definefontfallback[kr-serifslanted]    [texgyrepagella-regular*kr-latin-slanted]      [0x0000-0x0400][force=yes]
\definefontfallback[kr-serifboldslanted][texgyrepagella-bold*kr-latin-slanted]         [0x0000-0x0400][force=yes]
\definefontfallback[kr-serifcaps]       [texgyrepagella-regular*kr-latin-smallcaps]    [0x0000-0x0400][force=yes]
\definefontfallback[kr-sans]            [texgyreheros-regular*kr-latin-default]        [0x0000-0x0400][force=yes]
\definefontfallback[kr-sansbold]        [texgyreheros-bold*kr-latin-default]           [0x0000-0x0400][force=yes]
\definefontfallback[kr-sansitalic]      [texgyreheros-italic*kr-latin-default]         [0x0000-0x0400][force=yes]
\definefontfallback[kr-sansbolditalic]  [texgyreheros-bolditalic*kr-latin-default]     [0x0000-0x0400][force=yes]
\definefontfallback[kr-sansslanted]     [texgyreheros-regular*kr-latin-slanted]        [0x0000-0x0400][force=yes]
\definefontfallback[kr-sansboldslanted] [texgyreheros-bold*kr-latin-slanted]           [0x0000-0x0400][force=yes]
\definefontfallback[kr-sanscaps]        [texgyreheros-regular*kr-latin-smallcaps]      [0x0000-0x0400][force=yes]
\definefontfallback[kr-mono]            [texgyrecursor-regular]                        [0x0000-0x0400][force=yes]
\definefontfallback[kr-monobold]        [texgyrecursor-bold]                           [0x0000-0x0400][force=yes]
\definefontfallback[kr-monoitalic]      [texgyrecursor-italic]                         [0x0000-0x0400][force=yes]
\definefontfallback[kr-monobolditalic]  [texgyrecursor-bolditalic]                     [0x0000-0x0400][force=yes]
\definefontfallback[kr-monoslanted]     [texgyrecursor-regular*kr-latin-slanted-mono]  [0x0000-0x0400][force=yes]
\definefontfallback[kr-monoboldslanted] [texgyrecursor-bold*kr-latin-slanted-mono]     [0x0000-0x0400][force=yes]
\definefontfallback[kr-monocaps]        [texgyrecursor-regular*kr-latin-smallcaps-mono][0x0000-0x0400][force=yes]

\starttypescriptcollection[unfonts]

\starttypescript [serif] [unbatang]
    \definefontsynonym [unbatang]           [file:unbatang]    [features=kr-default,fallbacks=kr-serif]
    \definefontsynonym [unbatangbold]       [file:unbatangbold][features=kr-default,fallbacks=kr-serifbold]
    \definefontsynonym [unbatangitalic]     [file:unbatang]    [features=kr-slanted,fallbacks=kr-serifitalic]
    \definefontsynonym [unbatangbolditalic] [file:unbatangbold][features=kr-slanted,fallbacks=kr-serifbolditalic]
    \definefontsynonym [unbatangslanted]    [file:unbatang]    [features=kr-slanted,fallbacks=kr-serifslanted]
    \definefontsynonym [unbatangboldslanted][file:unbatangbold][features=kr-slanted,fallbacks=kr-serifboldslanted]
    \definefontsynonym [unbatangcaps]       [file:unbatang]    [features=kr-default,fallbacks=kr-serifcaps]
\stoptypescript

\starttypescript [sans] [undotum]
    \definefontsynonym[undotum]             [file:undotum]     [features=kr-default,fallbacks=kr-sans]
    \definefontsynonym[undotumbold]         [file:undotumbold] [features=kr-default,fallbacks=kr-sansbold]
    \definefontsynonym[undotumitalic]       [file:undotum]     [features=kr-slanted,fallbacks=kr-sansitalic]
    \definefontsynonym[undotumbolditalic]   [file:undotumbold] [features=kr-slanted,fallbacks=kr-sansbolditalic]
    \definefontsynonym[undotumslanted]      [file:undotum]     [features=kr-slanted,fallbacks=kr-sansslanted]
    \definefontsynonym[undotumboldslanted]  [file:undotumbold] [features=kr-slanted,fallbacks=kr-sansboldslanted]
    \definefontsynonym[undotumcaps]         [file:undotum]     [features=kr-default,fallbacks=kr-sanscaps]
\stoptypescript

\starttypescript [mono] [untype]
    \definefontsynonym[untype]              [file:untaza]      [features=kr-default,fallbacks=kr-mono]
    \definefontsynonym[untypebold]          [file:untaza]      [features=kr-default,fallbacks=kr-monobold]
    \definefontsynonym[untypeitalic]        [file:untaza]      [features=kr-slanted,fallbacks=kr-monoitalic]
    \definefontsynonym[untypebolditalic]    [file:untaza]      [features=kr-slanted,fallbacks=kr-monobolditalic]
    \definefontsynonym[untypeslanted]       [file:untaza]      [features=kr-slanted,fallbacks=kr-monoslanted]
    \definefontsynonym[untypeboldslanted]   [file:untaza]      [features=kr-slanted,fallbacks=kr-monoboldslanted]
    \definefontsynonym[untypecaps]          [file:untaza]      [features=kr-default,fallbacks=kr-monocaps]
\stoptypescript

\starttypescript [serif] [unbatang] [name]
    \definefontsynonym[Serif]           [unbatang]
    \definefontsynonym[SerifBold]       [unbatangbold]
    \definefontsynonym[SerifItalic]     [unbatangitalic]
    \definefontsynonym[SerifBoldItalic] [unbatangbolditalic]
    \definefontsynonym[SerifSlanted]    [unbatangslanted]
    \definefontsynonym[SerifBoldSlanted][unbatangboldslanted]
    \definefontsynonym[SerifCaps]       [unbatangcaps]
\stoptypescript

\starttypescript [sans] [undotum] [name]
    \definefontsynonym[Sans]            [undotum]
    \definefontsynonym[SansBold]        [undotumbold]
    \definefontsynonym[SansItalic]      [undotumitalic]
    \definefontsynonym[SansBoldItalic]  [undotumbolditalic]
    \definefontsynonym[SansSlanted]     [undotumslanted]
    \definefontsynonym[SansBoldSlanted] [undotumboldslanted]
    \definefontsynonym[SansCaps]        [undotumcaps]
\stoptypescript

\starttypescript [mono] [untype] [name]
    \definefontsynonym[Mono]            [untype]
    \definefontsynonym[MonoBold]        [untypebold]
    \definefontsynonym[MonoItalic]      [untypeitalic]
    \definefontsynonym[MonoBoldItalic]  [untypebolditalic]
    \definefontsynonym[MonoSlanted]     [untypeslanted]
    \definefontsynonym[MonoBoldSlanted] [untypeboldslanted]
    \definefontsynonym[MonoCaps]        [untypecaps]
\stoptypescript

% xits might get replaced with a texgyre times

\starttypescript[unfonts]
    \definetypeface [unfonts] [rm] [serif] [unbatang]
    \definetypeface [unfonts] [ss] [sans]  [undotum]
    \definetypeface [unfonts] [tt] [mono]  [untype]
    \definetypeface [unfonts] [mm] [math]  [xits]
\stoptypescript

\stoptypescriptcollection