-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
323 lines (313 loc) · 18.4 KB
/
index.html
File metadata and controls
323 lines (313 loc) · 18.4 KB
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
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
<!DOCTYPE html>
<html data-theme="emerald">
<head>
<meta charset="utf-8">
<title>ADA Font Check</title>
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Public+Sans:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
<!-- OpenType.js -->
<script src="https://cdn.jsdelivr.net/npm/opentype.js@latest/dist/opentype.min.js"></script>
<link rel="stylesheet" href="dist/style.css" media="screen" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body class="flex flex-col min-h-screen">
<div class="navbar bg-sky-800">
<div class="flex-1">
<div class="">
<img src="media/logo.png" class="btn btn-ghost" style="padding: 10px 10px 0px 10px;">
</div>
</div>
<div class="flex-none">
<ul class="menu menu-horizontal px-1">
<li tabindex="0">
<a class="text-secondary-content">
Upload
<svg class="fill-current" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"/></svg>
</a>
<ul class="p-2 bg-base-100 drop-shadow-xl z-3">
<li class="upload-btn-wrapper">
<a>File</a>
<input id="single-font" type="file" name="file" multiple="multiple"></input>
</li>
<li class="upload-btn-wrapper">
<a>Folder</a>
<input id="font-name" type="file" webkitdirectory mozdirectory msdirectory odirectory directory name="folder" multiple="multiple"></input>
</li>
</ul>
<li tabindex="0">
<a class="text-secondary-content">
Settings
<svg class="fill-current" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"/></svg>
</a>
<ul class="p-2 bg-base-100 z-3 drop-shadow-xl">
<li>
<a>
<input type="checkbox" class="checkbox" id="federal_only" onclick="toggleFederalOnly();" />
Federal Only
</a>
</li>
<li>
<a>
<input type="checkbox" class="checkbox" id="california_only" onclick="toggleCaliforniaOnly();" />
California Only
</a>
</li>
<li>
<a>
<input type="checkbox" class="checkbox" id="compact" onclick="toggleCompactTable()" />
Compact Table
</a>
</li>
<li>
<a>
<input type="checkbox" class="checkbox" id="darkmode" onclick="toggleTheme()" />
Dark Mode
</a>
</li>
</ul>
<li><a class="text-secondary-content" id="clear" onclick="clearFonts();">Clear</a></li>
<li><a class="text-secondary-content" onclick="downloadCSV();">Export</a></li>
</ul>
</div>
</div>
<main class="flex-grow base-100">
<div class="overflow-x-auto p-8 drop-shadow-lg">
<table class="table w-full flex">
<thead>
<tr>
<th colspan="3"></th>
<th colspan="2">Federal Character Tests</th>
<th colspan="2">California Character Tests</th>
</tr>
<tr>
<th>Font Name</th>
<th>Body Width</th>
<th>Stroke Width</th>
<!-- Federal -->
<th>
<div>Federal Tactile</div>
<div class="regular">Body: 55% - 110%</div>
<div class="regular">Stroke: 0% - 15%</div>
</th>
<th>
<div>Federal Visual</div>
<div class="regular">Body: 55% - 110%</div>
<div class="regular">Stroke: 10% - 30%</div>
</th>
<!-- California -->
<th>
<div>California Tactile</div>
<div class="regular">Body: 60% - 110%</div>
<div class="regular">Stroke: 0% - 15%</div>
</th>
<th>
<div>California Visual</div>
<div class="regular">Body: 60% - 110%</div>
<div class="regular">Stroke: 10% - 20%</div>
</th>
</tr>
</thead>
<tbody id="data">
<tr class="false">
<td class="">Typeface 1</td>
<td class="">65.00%</td>
<td class="">35.00%</td>
<td name="federal" class="text-error" data-export-value="Fail">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6">
<path fill-rule="evenodd" d="M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" />
</svg>
</td>
<td name="federal" class="text-error" data-export-value="Fail">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6">
<path fill-rule="evenodd" d="M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" />
</svg>
</td>
<td name="california" class="text-error" data-export-value="Fail">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6">
<path fill-rule="evenodd" d="M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" />
</svg>
</td>
<td name="california" class="text-error" data-export-value="Fail">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6">
<path fill-rule="evenodd" d="M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" />
</svg>
</td>
</tr>
<tr>
<td class="">Typeface 2</td>
<td class="">70.00%</td>
<td class="">15.00%</td>
<td name="federal" class="text-success" data-export-value="Pass">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6" style="color: green;">
<path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd" />
</svg>
</td>
<td name="federal" class="text-success" data-export-value="Pass">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6" style="color: green;">
<path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd" />
</svg>
</td>
<td name="california" class="text-success" data-export-value="Pass">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6" style="color: green;">
<path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd" />
</svg>
</td>
<td name="california" class="text-success" data-export-value="Pass">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6" style="color: green;">
<path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd" />
</svg>
</td>
</tr>
<tr>
<td class="">Typeface 3</td>
<td class="">70.00%</td>
<td class="">25.00%</td>
<td name="federal" class="text-success" data-export-value="Pass">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6" style="color: green;">
<path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd" />
</svg>
</td>
<td name="federal" class="text-success" data-export-value="Pass">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6" style="color: green;">
<path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd" />
</svg>
</td>
<td name="california" class="text-success" data-export-value="Pass">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6" style="color: green;">
<path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd" />
</svg>
</td>
<td name="california" class="text-error" data-export-value="Fail">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6">
<path fill-rule="evenodd" d="M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" />
</svg>
</td>
</tr>
</tbody>
</table>
</div>
</main>
<footer class="footer footer-center p-10 bg-base-300 text-base-content mt-auto">
<div class="grid grid-flow-col gap-4">
<label for="about-modal" class="link link-hover">About</label>
<label for="tests-modal" class="link link-hover">Tests</label>
<label for="usage-modal" class="link link-hover">Usage</label>
<label for="compliance-modal" class="link link-hover">Compliance</label>
<label for="disclaimer-modal" class="link link-hover">Disclaimer</label>
</div>
<div>
<div class="grid grid-flow-col gap-4">
<a href="https://opentype.js.org/glyph-inspector.html"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6">
<path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 01.67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 11-.671-1.34l.041-.022zM12 9a.75.75 0 100-1.5.75.75 0 000 1.5z" clip-rule="evenodd" />
</svg>
</a>
<a href="https://github.com/inVariabl/ADAFontCheck"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6">
<path fill-rule="evenodd" d="M14.447 3.027a.75.75 0 01.527.92l-4.5 16.5a.75.75 0 01-1.448-.394l4.5-16.5a.75.75 0 01.921-.526zM16.72 6.22a.75.75 0 011.06 0l5.25 5.25a.75.75 0 010 1.06l-5.25 5.25a.75.75 0 11-1.06-1.06L21.44 12l-4.72-4.72a.75.75 0 010-1.06zm-9.44 0a.75.75 0 010 1.06L2.56 12l4.72 4.72a.75.75 0 11-1.06 1.06L.97 12.53a.75.75 0 010-1.06l5.25-5.25a.75.75 0 011.06 0z" clip-rule="evenodd" />
</svg></a>
<a href="https://paypal.me/DanielCrooks?country.x=US&locale.x=en_US"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 6v12m-3-2.818l.879.659c1.171.879 3.07.879 4.242 0 1.172-.879 1.172-2.303 0-3.182C13.536 12.219 12.768 12 12 12c-.725 0-1.45-.22-2.003-.659-1.106-.879-1.106-2.303 0-3.182s2.9-.879 4.006 0l.415.33M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg></a>
</div>
</div>
<div>
<p>Copyright © 2026 - All rights reserved by Crooks Design.</p>
</div>
</footer>
<script src="src/index.js" charset="utf-8"></script>
<script src="src/checkfont.js" charset="utf-8"></script>
<!-- Modal -->
<input type="checkbox" id="about-modal" class="modal-toggle" />
<label for="about-modal" class="modal cursor-pointer">
<label class="modal-box relative" for="">
<h3 class="text-lg font-bold">About ADA Font Check</h3>
<p class="py-4">ADAFontCheck determines if a font meets U.S. Federal and California ADA accessibility regulations for tactile and visual signage using <a class="link" href="https://opentype.js.org/">opentype.js</a>.</p>
</label>
</label>
<input type="checkbox" id="tests-modal" class="modal-toggle" />
<label for="tests-modal" class="modal cursor-pointer">
<label class="modal-box relative" for="">
<h3 class="text-lg font-bold">ADA Tests Overview</h3>
<p class="">ADAFontCheck perfoms the following tests:</p>
<ul class="p-4 list-disc">
<li>Character Stroke Width ratio using the uppercase letter 'I'.</li>
<li>Character Body Width ratio using the uppercase letters 'I,' 'H,' and 'O'.</li>
<li>Italic Font detection.</li>
<li>Serif Font detection.</li>
<li>Sans Serif Font determination.</li>
<li>Fonts must meet the ratio requirements of both Tests 1 and 2 for ADA compliance.</li>
<li>Numerals are not tested for compliance but are considered compatible when used with letters of the same font set and size.</li>
</ul>
</label>
</label>
<input type="checkbox" id="usage-modal" class="modal-toggle" />
<label for="usage-modal" class="modal cursor-pointer">
<label class="modal-box relative" for="">
<h3 class="text-lg font-bold">How to use ADAFontCheck</h3>
<ol class="list-decimal p-4">
<li>Select “All Fonts” to display both Pass
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6 inline-svg" style="color: green;">
<path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z" clip-rule="evenodd" />
</svg>
and Fail
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6 inline-svg text-error">
<path fill-rule="evenodd" d="M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" />
</svg>
fonts. Select “ADA Fonts Only” to display just Pass fonts.</li>
<li>Select “Folder Upload” for multiple fonts or “File Upload” for a single font.</li>
<li>Navigate to your fonts source files.</li>
<li>Select the fonts and upload.</li>
<li>Review the test results. <i>Note that results appear for Sans Serif fonts only. Fonts that are not Sans Serif do not comply with ADA requirements.</i></li>
<li>Export the tests results.</li>
</ol>
</label>
</label>
<input type="checkbox" id="compliance-modal" class="modal-toggle" />
<label for="compliance-modal" class="modal cursor-pointer">
<label class="modal-box relative" for="">
<h3 class="text-lg font-bold">ADAFontCheck Compliance Information</h3>
<ol class="py-4 list-none">
This service is based on the <a class="link" href="https://archive.ada.gov/regs2010/2010ADAStandards/2010ADAStandards.pdf">2010 Americans with Disabilities Act Accessibility Guidelines (703.2.4, 703.2.6, 703.5.4, 703.5.7)</a>, the <a class="link" href="https://www.access-board.gov/prowag/supplemental.html#r410-visual-characters-on-signs">U.S. Access Board PROWAG section R410 Visual Characters on Signs (410.1, 410.3, 410.4, 410.5, 410.7)</a>, and the <a class="link" href="https://up.codes/viewer/california/ibc-2018/chapter/new_11B/accessibility-to-public-buildings-public-accommodations-commercial-buildings-and#new_11B-703">2019 California Building Standards Code (11B-703.2.4 / 1143A.6.4, 11B-703.2.6 / 1143.A.6.5, 11B-703.5.4 / 1143.A.5.3, 11B-703.5.7 / 1143A.5.6)</a>.
</ol>
</label>
</label>
<input type="checkbox" id="disclaimer-modal" class="modal-toggle" />
<label for="disclaimer-modal" class="modal cursor-pointer">
<label class="modal-box relative" for="">
<h3 class="text-lg font-bold">Disclaimer</h3>
<ol class="list-decimal p-5">
<li>ADAFontCheck is not endorsed by the United States Access Board or anyone else.</li>
<li>The creators of ADAFontCheck assume no liability or responsibility whatsoever for any direct, indirect, special, or other consequential damages relating to any use of this online service or the contents of this website.</li>
<li>Use at your own discretion with confidence.</li>
</ol>
</label>
</label>
<input type="checkbox" id="visualize-modal" class="modal-toggle" />
<label for="visualize-modal" class="modal cursor-pointer">
<label class="modal-box relative" style="max-width: none; width: auto;" for="">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem;">
<h3 class="text-lg font-bold" id="visualize-title">Glyph Inspector</h3>
<button class="btn btn-sm btn-primary" onclick="printReport()">Print PDF Report</button>
</div>
<div class="flex flex-row flex-wrap lg:flex-nowrap justify-center p-4" style="gap: 2em;">
<div class="text-center">
<h4 class="font-bold text-xl mb-2">I</h4>
<canvas id="canvas-i" width="400" height="400" class="border border-base-300 bg-base-100"></canvas>
<div id="info-i" class="text-sm mt-2 text-left p-2 bg-base-200 rounded"></div>
</div>
<div class="text-center">
<h4 class="font-bold text-xl mb-2">H</h4>
<canvas id="canvas-h" width="400" height="400" class="border border-base-300 bg-base-100"></canvas>
<div id="info-h" class="text-sm mt-2 text-left p-2 bg-base-200 rounded"></div>
</div>
<div class="text-center">
<h4 class="font-bold text-xl mb-2">O</h4>
<canvas id="canvas-o" width="400" height="400" class="border border-base-300 bg-base-100"></canvas>
<div id="info-o" class="text-sm mt-2 text-left p-2 bg-base-200 rounded"></div>
</div>
</div>
</label>
</label>
</body>
</html>