summaryrefslogtreecommitdiff
path: root/tex/context/fonts/mkiv/type-imp-opendyslexic.mkiv
blob: 1f366b8eb8c2c65131674036018efe2fec099842 (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
%D \module
%D   [       file=type-imp-opendyslexic,
%D        version=2013.05.02,
%D          title=\CONTEXT\ Typescript Macros,
%D       subtitle=Opendyslexic Fonts,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

%D It's kind of funny that the term \quote {dyslexic} itself is hard to read and I
%D (not being dyslexic) need to double check it.
%D
%D As often a sans is adviced: I personally think that Optima Nova is a quite good
%D choice but it doesn't come for free.

% \enabledirectives[fonts.features.combine]
%
% \usetypescriptfile[opendyslexic]
%
% \starttypescript[opendyslexic-new]
%     \definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default] [features=opendyslexic-new]
%     \definetypeface [\typescriptone] [ss] [serif] [\typescriptone] [default] [features=opendyslexic-new]
%     \definetypeface [\typescriptone] [tt] [mono]  [\typescriptone] [default]
%     \definetypeface [\typescriptone] [mm] [math]  [xits]           [default]
% \stoptypescript
%
% \setupbodyfont
%   [opendyslexic-new,10pt]
%
% \starttext
%     \input tufte
% \stoptext

\starttypescriptcollection[opendyslexic]

    \definefontfeature
      [opendyslexic-new]
      [spacing={0.4+0.2-0.1}]

    \starttypescript [\s!serif] [opendyslexic] [\s!name]
        \setups[\s!font:\s!fallback:\s!serif]
        \definefontsynonym [\s!Serif]           [\s!file:opendyslexic-regular.otf]    [\s!features=\s!default]
        \definefontsynonym [\s!SerifBold]       [\s!file:opendyslexic-bold.otf]       [\s!features=\s!default]
        \definefontsynonym [\s!SerifItalic]     [\s!file:opendyslexic-italic.otf]     [\s!features=\s!default]
        \definefontsynonym [\s!SerifBoldItalic] [\s!file:opendyslexic-bolditalic.otf] [\s!features=\s!default]
    \stoptypescript

    \starttypescript [\s!serif] [opendyslexic-new] [\s!name]
        \setups[\s!font:\s!fallback:\s!serif]
        \definefontsynonym [\s!Serif]     [\s!file:opendyslexic3-regular.ttf] [\s!features={opendyslexic-new,\s!default}]
        \definefontsynonym [\s!SerifBold] [\s!file:opendyslexic3-bold.ttf]    [\s!features={opendyslexic-new,\s!default}]
    \stoptypescript

    \starttypescript [\s!sans] [opendyslexic,opendyslexic-new] [\s!name]
        \setups[\s!font:\s!fallback:\s!sans]
        \definefontsynonym [\s!Sans]           [\s!file:opendyslexicalta-regular.otf]    [\s!features=\s!default]
        \definefontsynonym [\s!SansBold]       [\s!file:opendyslexicalta-bold.otf]       [\s!features=\s!default]
        \definefontsynonym [\s!SansItalic]     [\s!file:opendyslexicalta-italic.otf]     [\s!features=\s!default]
        \definefontsynonym [\s!SansBoldItalic] [\s!file:opendyslexicalta-bolditalic.otf] [\s!features=\s!default]
    \stoptypescript

    \starttypescript [\s!mono] [opendyslexic,opendyslexic-new] [\s!name]
        \setups[\s!font:\s!fallback:\s!mono]
        \definefontsynonym [\s!Mono] [\s!file:opendyslexicmono-regular.otf] [\s!features=\s!none]
    \stoptypescript

    % We now have more gyre fonts so maybe we should test with a less times look
    % alike instead.

    \starttypescript[opendyslexic,opendyslexic-new]
        \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default]
        \definetypeface [\typescriptone] [\s!ss] [\s!sans]  [\typescriptone] [\s!default]
        \definetypeface [\typescriptone] [\s!tt] [\s!mono]  [\typescriptone] [\s!default]% [rscale=1.065]
        \definetypeface [\typescriptone] [\s!mm] [\s!math]  [xits]           [\s!default]% [rscale=1.020]
    \stoptypescript

\stoptypescriptcollection