blob: 82a6b211de4654e09abfdcf3965abcb700300672 (
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
|
\relax
Part of the tolkienfonts package
Copyright 2010 Ariel Barton
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
of this license or (at your option) any later version.
The latest version of this license is in
http://www.latex-project.org/lppl.txt
and version 1.3 or later is part of all distributions of LaTeX
version 2005/12/01 or later.
This work has the LPPL maintenance status `maintained'.
The Current Maintainer of this work is Ariel Barton.
This work consists of all the files listed in Appendix F of the file
`tolkienfontsdoc.pdf'.
Date: 2010/08/29
Version: 2
\metrics
\fontspecificglyphs
\setint{fontdimen(5)}{400} % 1 ex
\newif \iffancykerns \fancykernsfalse
\newif \iferegion
% Note: The fancy kerning assumes that there is some dummy character in your font,
% named defaultkernchar, which kerns on the right to everything's default kern.
\def\cloneglyph#1#2{
\setglyph{#1} \glyph{#2}{1000} \endsetglyph
\setleftrightkerning{#1}{#2}{1000}}
\def\cloneglyphunkerned#1#2{
\setglyph{#1} \glyph{#2}{1000} \endsetglyph
\setrightkerning{#1}{#2}{1000}}
\def\cloneglyphkerned#1#2{
\setglyph{#1} \movert{\kerning{defaultkernchar}{#2}}\glyph{#2}{1000} \endsetglyph
\setrightkerning{#1}{#2}{1000}}
\setglyph{latinperiod} \endsetglyph
\setglyph{defaultkernchar} \endsetglyph
\setcommand\wordendlig#1{
\ligature{LIG/}{dashsilent}{#1}
\ligature{LIG/}{lowonedot}{#1}
\ligature{LIG/}{onedot}{#1}
\ligature{LIG/}{twodots}{#1}
\ligature{LIG/}{threedots}{#1}
\ligature{LIG/}{fourdots}{#1}
\ligature{LIG/}{tallthreedots}{#1}
\ligature{LIG/}{latinperiod}{#1}
}
\setglyph{cirthII} \glyph{cirthI}{1000}\movert{\kerning{cirthI}{cirthI}}\glyph{cirthI}{1000}\endsetglyph
\setglyph{cirthUUalt} \glyph{cirthU}{1000}\movert{\kerning{cirthU}{cirthU}}\glyph{cirthU}{1000}\endsetglyph
\setglyph{daeronX} \glyph{cirthK}{1000}\movert{\kerning{cirthK}{cirthSS}}\glyph{cirthSS}{1000}\endsetglyph
\setleftkerning {daeronX}{cirthK}{1000}
\setrightkerning{daeronX}{cirthSS}{1000}
\cloneglyph{altcirthD}{cirthD}
\cloneglyph{cirthC}{cirthK}
\cloneglyph{cirthFnoV}{cirthF}
\cloneglyph{cirthWafterA}{cirthW}
\cloneglyph{daeronY}{cirthI}
\cloneglyph{engdaeronN}{daeronN}
\cloneglyph{startcirthL}{cirthL}
\cloneglyph{startdaeronR}{daeronR}
\cloneglyph{moriaR}{daeronN}
\cloneglyph{daeronENG}{moriaN}
\cloneglyph{moriaZ}{daeronNJ}
\cloneglyph{ereborK}{cirthK}
\cloneglyph{ereborX}{daeronNJ}
\cloneglyph{moriaJ}{daeronR}
\cloneglyph{ereborG}{daeronR}
\cloneglyph{moriaZH}{daeronRH}
\cloneglyph{ereborGH}{daeronRH}
\cloneglyph{moriaND}{daeronNG}
\cloneglyph{moriaNJ}{daeronND}
\cloneglyph{altmoriaNJ}{altdaeronND}
\cloneglyph{ereborOU}{daeronND}
\cloneglyph{altereborOU}{altdaeronND}
\cloneglyph{moriaENG}{daeronZ}
\cloneglyph{ereborZ}{cirthUU}
\cloneglyph{daeronNclone}{daeronN}
\cloneglyph{cirthSSletterC}{cirthSS}
\cloneglyph{cirthAnodipthong}{cirthA}
\cloneglyph{cirthEnodipthong}{cirthE}
\cloneglyph{cirthInodipthong}{cirthI}
\cloneglyph{moriaYnodipthong}{moriaY}
\cloneglyph{hobbitA}{cirthD}
\cloneglyph{hobbitB}{cirthM}
\cloneglyph{hobbitC}{cirthCH}
\cloneglyph{hobbitD}{daeronND}
\cloneglyph{hobbitF}{cirthG}
\cloneglyph{hobbitG}{daeronZ}
\cloneglyph{hobbitH}{cirthEE}
\cloneglyph{hobbitI}{cirthI}
\cloneglyph{hobbitJ}{cirthI}
\cloneglyph{hobbitL}{cirthT}
\cloneglyph{hobbitM}{altdaeronND}
\cloneglyph{hobbitN}{cirthLH}
\cloneglyph{hobbitO}{cirthGW}
\cloneglyph{hobbitP}{cirthNW}
\cloneglyph{hobbitR}{cirthB}
\cloneglyph{hobbitS}{moriaY}
\cloneglyph{hobbitT}{daeronN}
\cloneglyph{hobbitU}{cirthA}
\cloneglyph{hobbitV}{cirthA}
\cloneglyph{hobbitW}{cirthP}
\cloneglyph{hobbitX}{moriaN}
\cloneglyph{hobbitZ}{daeronNJ}
\cloneglyph{hobbitOO}{cirthHW}
\cloneglyph{hobbitTH}{cirthPS}
\cloneglyph{hobbitNG}{cirthUU}
\cloneglyph{hobbitEA}{cirthNGW}
\cloneglyph{hobbitEE}{cirthU}
\ifisglyph{altcirthOO}\then\cloneglyph{hobbitE}{altcirthOO}\else\cloneglyph{hobbitE}{cirthOO}\fi
\ifisglyph{alticirthQ}\then\cloneglyph{hobbitK}{alticirthQ}\else\cloneglyph{hobbitK}{hobbitC}\fi
\ifisglyph{ereborAU} \then\cloneglyph{hobbitY}{ereborAU} \else\cloneglyph{hobbitY}{cirthAA}\fi
\cloneglyph{hobbitAalt}{altcirthD}
\cloneglyph{hobbitTcap}{hobbitT}
\cloneglyph{hobbitNcap}{hobbitN}
\cloneglyph{hobbitAnodipthong}{hobbitA}
\cloneglyph{hobbitEnodipthong}{hobbitE}
\cloneglyph{hobbitInodipthong}{hobbitI}
\cloneglyph{hobbitOnodipthong}{hobbitO}
\cloneglyph{hobbitUnodipthong}{hobbitU}
\cloneglyph{hobbitYnodipthong}{hobbitY}
\setglyph{hobbitQ}\glyph{cirthCH}{1000}\movert{\kerning{cirthCH}{cirthP}}\glyph{cirthP}{1000}\endsetglyph
\setleftkerning{hobbitQ}{cirthCH}{1000}
\setrightkerning{hobbitQ}{cirthP}{1000}
\setglyph{hobbitEO}\glyph{hobbitE}{1000}\movert{\kerning{hobbitE}{hobbitO}}\glyph{hobbitO}{1000}\endsetglyph
\setleftkerning{hobbitEO}{hobbitE}{1000}
\setrightkerning{hobbitEO}{hobbitO}{1000}
\setglyph{hobbitOA}\glyph{hobbitO}{1000}\movert{\kerning{hobbitO}{hobbitA}}\glyph{hobbitA}{1000}\endsetglyph
\setleftkerning{hobbitOA}{hobbitO}{1000}
\setrightkerning{hobbitOA}{hobbitA}{1000}
\setglyph{hobbitST}\glyph{hobbitS}{1000}\movert{\kerning{hobbitS}{hobbitT}}\glyph{hobbitT}{1000}\endsetglyph
\setleftkerning{hobbitST}{hobbitS}{1000}
\setrightkerning{hobbitST}{hobbitT}{1000}
\setglyph{hobbitAA}\glyph{hobbitA}{1000}\movert{\kerning{hobbitA}{hobbitA}}\glyph{hobbitA}{1000}\endsetglyph
\setleftrightkerning{hobbitAA}{hobbitA}{1000}
\setglyph{hobbitUU}\glyph{hobbitU}{1000}\movert{\kerning{hobbitU}{hobbitU}}\glyph{hobbitU}{1000}\endsetglyph
\setleftrightkerning{hobbitUU}{hobbitU}{1000}
\setglyph{hobbitYY}\glyph{hobbitY}{1000}\movert{\kerning{hobbitY}{hobbitY}}\glyph{hobbitY}{1000}\endsetglyph
\setleftrightkerning{hobbitYY}{hobbitY}{1000}
\setglyph{threedots}\push\glyph{lowonedot}{1000}\pop\push\glyph{highonedot}{1000}\pop\glyph{onedot}{1000}\endsetglyph
\setglyph{tallthreedots}\glyph{threedots}{1000}\endsetglyph
\setglyph{fourdots}\glyph{threedots}{1000}\endsetglyph
\setglyph{threedots}\push\glyph{lowonedot}{1000}\pop\push\glyph{highonedot}{1000}\pop\glyph{onedot}{1000}\endsetglyph
\setglyph{tallthreedots}\glyph{threedots}{1000}\endsetglyph
\setglyph{fourdots}\glyph{threedots}{1000}\endsetglyph
% Getting kerning to cooperate with ligatures
\def\setupsavekerns#1#2{
\cloneglyphkerned{#1kerned}{#1}
\cloneglyphkerned{#2kerned}{#2}
\cloneglyphunkerned{#1kernsfor#2}{#1}
\cloneglyphkerned{#1kernedkernsfor#2}{#1}
}
\def\dosinglefancykern#1{\expandafter\ifx\csname fancykerns#1\endcsname\relax \else \csname fancykerns#1\endcsname\fi}
\def\setupsinglefancykern#1#2#3{
\ifnumber{\kerning{#1}{#2}}<{\int{kernthreshold}}\then
\ifnumber{\kerning{#1}{#3}}<{\int{kernthreshold}}\then
\expandafter\def\csname fancykerns#1#2\endcsname{\ligature{/LIG}{#2}{#2kernedkernsfor#3}}
\Else
\expandafter\def\csname fancykerns#1#2\endcsname{\ligature{/LIG}{#2}{#2kerned}}
\Fi
\Else
\ifnumber{\kerning{#1}{#3}}<{\int{kernthreshold}}\then
\expandafter\def\csname fancykerns#1#2\endcsname{\ligature{/LIG}{#2}{#2kernsfor#3}}
\Else
\expandafter\def\csname fancykerns#1#2\endcsname{}
\Fi
\Fi
}
\endmetrics
|