-
Notifications
You must be signed in to change notification settings - Fork 2
/
ogham.html
265 lines (237 loc) · 19 KB
/
ogham.html
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<!doctype html>
<html>
<head>
<title>Paleo Codage - A machine-readable way to describe cuneiform characters paleographically</title>
<script src="https://hongru.github.io/proj/canvas2image/canvas2image.js"></script>
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<script src="js/canvas2svg.js"></script>
<script src="https://cdn.jsdelivr.net/npm/opentype.js@latest/dist/opentype.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/jquery.tabletojson.min.js" integrity="sha256-AqDz23QC5g2yyhRaZcEGhMMZwQnp8fC6sCZpf+e7pnw=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.1/js/jquery.tablesorter.min.js"></script>
<script src="js/paleocodage.js"></script>
<script>
function htmlTableToJSON(filename,ext){
var table = $('#examples').tableToJSON(); // Convert the table into a javascript object
saveTextAsFile(JSON.stringify(table),ext,filename)
console.log(table);
}
</script>
<style>
body {
font: 13px Helvetica, arial, freesans, sans-serif;
line-height: 1.4;
color: #333;
margin: 0 0 50px 0;
padding: 0;
}
.container {
width: 1200px;
margin-left: auto;
margin-right: auto;
}
#glyphs {
clear: both;
}
.wrapper {
float: left;
margin: 5px;
border: 1px solid #ccc;
}
.wrapper span {
text-align: center;
background: #ddd;
display: block;
}
</style>
<style>
.cod {
display: flex;
flex-wrap: wrap;
width: 100px;
max-width: 80px;
padding: 10px;
white-space: normal;
}
.table-wrapper-scroll-y {
display: block;
max-height: 600px;
max-width: 100%;
overflow-y: auto;
-ms-overflow-style: -ms-autohiding-scrollbar;
}
</style>
</head>
<body>
<div class="page-header text-center">
<h1>Paleo Codage - Ogham Edition</h1><h5>A machine-readable way to describe ogham characters paleographically</h5>
</div>
<br/><br/>
<div class="container">
<div class="row">
<div class="left col-sm-5">
<canvas id="myCanvas" width="300" height="100" style="border:1px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.</canvas>
<img id="canvasImg"/>
<br/>
Stroke Order Input: <input type="text" id="canvasinput" onKeyUp="strokeParser(document.getElementById('canvasinput').value)"/><br/><button id="clearcanvas" onClick="clearCanvas(false)">Clear Canvas</button><br/>
<button id="downloadImage" onClick="to_image()">Download Image</button><button id="downloadSVG" onClick="to_svg()">Download SVG</button><button id="createFont" onClick="createFont()">Create Font</button><br/>
<br/>
Tutorial:
<table>
<tr><td><b>a</b> <button id="horizontal" onClick="showCharacter('a')">Horizontal Stroke (a)</button><button id="D" onClick="showCharacter('A')">Big (A)</button>
<button id="sa" onClick="showCharacter('sa')">Small (sa)</button></td></tr>
<tr><td><b>b</b> <button id="vertical" onClick="showCharacter('b')">Vertical Stroke (b)</button>
<button id="D" onClick="showCharacter('B')">Big (B)</button><button id="sb" onClick="showCharacter('sb')">Small (sb)</button></td></tr>
<tr><td><b>c</b> <button id="diagonal1" onClick="showCharacter('c')">Diagonal Stroke1 (c)</button>
<button id="C" onClick="showCharacter('C')">Big (C)</button><button id="sc" onClick="showCharacter('sc')">Small (sc)</button></td></tr>
<tr><td><b>d</b> <button id="diagonal2" onClick="showCharacter('d')">Diagonal Stroke2 (d)</button>
<button id="D" onClick="showCharacter('D')">Big (D)</button><button id="sd" onClick="showCharacter('sd')">Small (sd)</button></td></tr>
<tr><td><b>e</b> <button id="diagonal3" onClick="showCharacter('e')">Diagonal Stroke3 (e)</button>
<button id="E" onClick="showCharacter('E')">Big (E)</button><button id="se" onClick="showCharacter('se')">Small (se)</button></td></tr>
<tr><td><b>f</b> <button id="diagonal4" onClick="showCharacter('f')">Diagonal Stroke4 (f)</button>
<button id="F" onClick="showCharacter('F')">Big (F)</button><button id="sf" onClick="showCharacter('sf')">Small (sf)</button></td></tr>
<tr><td><b>w</b> <button id="wedge" onClick="showCharacter('w')">Winkelhaken (w)</button><button id="F" onClick="showCharacter('W')">Big (W)</button></td></tr><tr><td><b>-</b> right of the current stroke passing through other strokes</td></tr>
<tr><td><b>_</b> right of the current stroke NOT passing through other strokes</td></tr>
<tr><td><b>:</b> under the current stroke passing through other strokes</td></tr>
<tr><td><b>;</b> under the current stroke NOT passing through other strokes</td></tr>
<tr><td><b>/</b> half the distance of <b>:</b> under the current stroke passing through other strokes </td></tr>
<tr><td><b>.</b> diagonal right under the current stroke</td></tr>
<tr><td><b>,</b> diagonal left above the current stroke</td></tr>
<tr><td><b>s</b> smaller version of the stroke (e.g. sb, sc)</td></tr>
<tr><td><b>!</b> mirrored version of the stroke (e.g. !a, !A, !sa)</td></tr>
<tr><td><b>Whitespace</b> Enough distance to start a new character</td></tr>
</table>
</div>
<div class="left col-sm-7">
<span id="amount"></span>
<div class="table-wrapper-scroll-y">
<table align="center" id="examples" class="tablesorter" cellpadding="2">
<thead>
<tr><th>Sign</th><th>Code point</th><th>Transliteration</th><th>Borger</th><th>Code</th><th>SVG</th><th>Gottstein</th><th>Comment</th><th>Source</th><th>Epoch</th><th>Location</th></tr><tr>
</thead><tbody>
<tr><td class="sign"> </td><td class="codepoint">U+1680</td><td class="transliteration">Space</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter('b')">b</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td></td><td></td><td></td><td></td><td></tr>
<tr><td class="sign">ᚁ</td><td class="codepoint">U+1681</td><td class="transliteration">Beith</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter('b-#a')">b-#a</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td>EDURU</td><td></td><td></td><td></td></tr>
<tr><td class="sign">ᚂ</td><td class="codepoint">U+1682</td><td class="transliteration">Luis</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter('b-a-a')">b-a-a</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td>AGAM</td><td></td><td></td><td></td></tr>
<tr><td class="sign">ᚃ</td><td class="codepoint">U+1683</td><td class="transliteration">Fearn</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter('B-a-a-a')">B-a-a-a</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td></td><td></td><td></td><td></td></tr>
<tr><td class="sign">ᚄ</td><td class="codepoint">U+1684</td><td class="transliteration">Sail</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter('B-a-a-a-a')">B-a-a-a-a</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td></td><td></td><td></td><td></td></tr>
<tr><td class="sign">ᚅ</td><td class="codepoint">U+1685</td><td class="transliteration">Nion</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter('B-a-a-ba-a-a')">B-a-a-ba-a-a</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td></td><td></td><td></td><td></td></tr>
<tr><td class="sign">ᚆ</td><td class="codepoint">U+1686</td><td class="transliteration">Uath</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter(';b-#a')">;b-#a</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td></td><td></td><td></td><td></td></tr>
<tr><td class="sign">ᚇ</td><td class="codepoint">U+1687</td><td class="transliteration">Dair</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter(';b-a-a')">;b-a-a</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td></td><td></td><td></td><td></td></tr>
<tr><td class="sign">ᚈ</td><td class="codepoint">U+1688</td><td class="transliteration">Tinne</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter(';B-a-a-a')" >;B-a-a-a</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td>GAB, DU8, TUḪ</td><td></td><td></td><td></td></tr>
<tr><td class="sign">ᚉ</td><td class="codepoint">U+1689</td><td class="transliteration">Coll</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter(';B-a-a-a-a')">;B-a-a-a-a</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td>DURU2, DURUN, TUKUL, TUŠ</td><td></td><td></td><td></td></tr>
<tr><td class="sign">ᚊ</td><td class="codepoint">U+168A</td><td class="transliteration">Ceirt</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter(';b-a;B-a-a-a-a')">;b-a;B-a-a-a-a</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td></td><td></td><td></td><td></td></tr>
<tr><td class="sign">ᚋ</td><td class="codepoint">U+168B</td><td class="transliteration">Muin</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter('B-d')">B-d</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td></td><td></td><td></td><td></td></tr>
<tr><td class="sign">ᚌ</td><td class="codepoint">U+168C</td><td class="transliteration">Gort</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter('B-d-d')">B-d-d</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td>KU6</td><td></td><td></td></tr>
<tr><td class="sign">ᚍ</td><td class="codepoint">U+168D</td><td class="transliteration">nGeadal</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter('Bd-d-d')">Bd-d-d</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td></td><td></td><td></td><td></td></tr>
<tr><td class="sign">ᚎ</td><td class="codepoint">U+168E</td><td class="transliteration">Straif</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter('Bd-d-bd-d')">Bd-d-bd-d</button></td><td class="svg"><div class="svgcontainer"></div><td class="gottstein"></td><td></td><td></td><td></td></td></tr>
<tr><td class="sign">ᚏ</td><td class="codepoint">U+168F</td><td class="transliteration">Ruis</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter('Bd-d-Bd-d-d')">Bd-d-Bd-d-d</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td></td><td></td><td></td><td></td></tr>
<tr><td class="sign">ᚐ</td><td class="codepoint">U+1690</td><td class="transliteration">Ailm</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter('::b-a')">::b-a</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td>GAG, DU3, RU2</td><td></td><td></td><td></td></tr>
<tr><td class="sign">ᚑ</td><td class="codepoint">U+1691</td><td class="transliteration">Onn</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter('::b-a-a')">::b-a-a</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td></td><td></td><td></td><td></td></tr>
<tr><td class="sign">ᚒ</td><td class="codepoint">U+1692</td><td class="transliteration">Ur</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter('::B-a-a-a')">::B-a-a-a</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td></td><td></td><td></td><td></td></tr>
<tr><td class="sign">ᚓ</td><td class="codepoint">U+1693</td><td class="transliteration">Eadhadh</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter('::B-a-a-a-a')">::B-a-a-a-a</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td></td><td></td><td></td><td></td></tr>
<tr><td class="sign">ᚔ</td><td class="codepoint">U+1694</td><td class="transliteration">Iodhadh</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter('::B-a-a-a::b-a-a')">::B-a-a-a::b-a-a</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td></td><td></td><td></td><td></td></tr>
<tr><td class="sign">ᚕ</td><td class="codepoint">U+1695</td><td class="transliteration">Eabhadh</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter('b/cd')">b/cd</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td></td><td></td><td></td><td></td></tr>
<tr><td class="sign">ᚖ</td><td class="codepoint">U+1696</td><td class="transliteration">Or</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter('c.c')">c.c</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td></td><td></td><td></td><td></td></tr>
<tr><td class="sign">ᚗ</td><td class="codepoint">U+1697</td><td class="transliteration">Uilleann</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter(':b:b_b:b:b_:b')">b:b_b:b:b_:b</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td></td><td></td><td></td><td></td></tr>
<tr><td class="sign">ᚘ</td><td class="codepoint">U+1698</td><td class="transliteration">Ifin</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter('b::b_a')">b::b_a</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td></td><td></td><td></td><td></td></tr>
<tr><td class="sign">ᚙ</td><td class="codepoint">U+1699</td><td class="transliteration">Eamhancholl</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter(':B:B:B:B-a-a-a-a')">:B:B:B:B-a-a-a-a</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td></td><td></td><td></td><td></td></tr>
<tr><td class="sign">ᚚ</td><td class="codepoint">U+169A</td><td class="transliteration">Peith</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter('B-:b')">B-:b</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td></td><td></td><td></td><td></td></tr>
<tr><td class="sign">᚛</td><td class="codepoint">U+169B</td><td class="transliteration">Mark</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter('c::::d---:B')">c::::d---:b</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td></td><td></td><td></td><td></td></tr>
<tr><td class="sign">᚜</td><td class="codepoint">U+169C</td><td class="transliteration">Feather Mark</td><td class="borger"></td><td><button class="codebutton" onClick="showCharacter(':b---d::::e')">:b---d::::e</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td></td><td></td><td></td><td></td></tr>
</tbody></table>
</div>
</button></td><td class="svg"><div class="svgcontainer"></div></td><td class="gottstein"></td><td></td><td></td><td></td><td></td></tr></table>
</div>
<footer class="page-footer font-small blue pt-4">
<!-- Footer Links -->
<div class="container-fluid text-center text-md-left">
<!-- Grid row -->
<div class="row">
<!-- Grid column -->
<div class="col-md-6 mt-md-0 mt-3">
<!-- Content -->
<h5>Description</h5>
<p>This website uses JavaScript to allow the user to describe their ogham characters using PaleoCodage,
a system to describe the shape of originally cuneiform characters.<br/>
The system is described in detail in the following short paper publication:<br/>
<a href="https://dh2019.adho.org/short-papers/">Paleo Codage - A machine-readable way to describe cuneiform characters paleographically</a>
The result of the description can be saved as a PNG image, as SVG or can be incorporated into an OpenType font.<br/>
Similar to the implementation at <a href="https://symbolset.com">https://symbolset.com</a>,<br/> the font can be used to replace modified transliteration texts with correct sign variants defined in PaleoCodage
which is demonstrated above.</p>
</div>
<!-- Grid column -->
<hr class="clearfix w-100 d-md-none pb-3">
<!-- Grid column -->
<div class="col-md-3 mb-md-0 mb-3">
<!-- Links -->
<h5>Downloads</h5>
<ul class="list-unstyled">
<li>
<button id="asjson" onclick="htmlTableToJSON('paleocodes','.json')">PaleoCodes as JSON</button>
</li>
<li>
<button id="asttl" onclick="createTTL()">PaleoCodes as TTL</button>
</li>
</ul>
</div>
<!-- Grid column -->
<!-- Grid column -->
<div class="col-md-3 mb-md-0 mb-3">
<!-- Links -->
<h5>Links</h5>
<ul class="list-unstyled">
<li>
<a href="https://dhd2020.de/" target="_blank">DHd2020</a>
</li>
<li>
<a href="https://github.com/situx/PaleoCodage" target="_blank">PaleoCodage Repository Github</a>
</li>
<li>
<a href="https://www.mainzed.org" target="_blank">mainzed</a>
</li>
</ul>
</div>
<!-- Grid column -->
</div>
<!-- Grid row -->
</div>
<!-- Footer Links -->
<!-- Copyright -->
<div class="footer-copyright text-center py-3">
</div>
<!-- Copyright -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/processing.js/1.6.6/processing.min.js" type="text/javascript"></script>
</footer>
<div class="container">
<h1 id="fontFamilyName"></h1>
<p>This font is generated dynamically in the browser.</p>
<button onclick="font.download()">Download Font</button>
<div id="glyphs"></div>
</div>
<div id="graphDiv" width="1000" height="600"></div>
<script>
$(function() {
var count = $('#examples tr').length;
$('#amount').html((count-1)+" characters");
createOpenFont();
});
$("#examples").tablesorter();
$("#canvasinput").bind({
keydown: function(e) {
if ((e.which >64 && e.which < 71) || (e.which>36 && e.which<41) || e.which == 83 || e.which == 86 || e.which == 32 || e.which == 87 || e.which == 226 || e.which == 219
|| e.which == 46 || e.which == 49 || e.which == 55 || e.which==8 || e.which == 111 || e.which==110 || (e.which>186 && e.which<192)) {
return true;
}
return false;
}
});
</script>
</body>
</html>