-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
189 lines (189 loc) · 8.87 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Font Atlas Generator</title>
<link crossorigin="anonymous" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/normalize.css@8/normalize.min.css">
<link crossorigin="anonymous" rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Open+Sans&display=block">
<link rel="icon" href="assets/favicon.png" sizes="32x32">
<link rel="stylesheet" type="text/css" href="build/css/main.css">
</head>
<body>
<div class="header">
<div class="title">
<div><a href="https://github.com/Lucide/font-atlas-generator" target="_blank">Font Atlas Generator</a></div>
<div>generate a sprite atlas from a specified font and charset</div>
</div>
<div class="exportInputs">
<button type="button" id="exportREXPaint" class="input-navButton">export charset for REXPaint</button>
<!-- <div class="filler"></div>-->
<button type="button" id="saveImage" class="input-navButton">save image</button>
</div>
</div>
<div class="preview">
<div>
<canvas id="canvas"></canvas>
</div>
</div>
<div class="controls">
<div class="section">
Fonts
</div>
<div class="fontsInputs">
<div class="mandatoryFont">
<input type="radio" id="tabFontName" name="tab-group-font" autocomplete="off" checked>
<label for="tabFontName">Name</label>
<div class="tabName">
<label for="fontName">use an installed font:</label>
<input type="text" id="fontName" class="input-text-file" value="DejaVu Sans Mono" autocomplete="off" spellcheck="false">
</div>
<input type="radio" id="tabFontFile" name="tab-group-font" autocomplete="off">
<label for="tabFontFile">File</label>
<div class="tabFile">
<label for="fontFile">load a font file:</label>
<input type="file" id="fontFile" class="input-text-file" accept=".ttf, .otf, .woff, .woff2" autocomplete="off">
</div>
</div>
<div class="wrappable-input">
<label for="bitmapWidth">Fallback fonts:</label>
<div class="input-number">
<input type="number" id="fallbackFontsCount" min="0" value="0" autocomplete="off">n
</div>
</div>
<div class="fallbackFont template">
<input type="radio" id="tabFFontName" name="tab-group-ffont" autocomplete="off" checked>
<label for="tabFFontName">Name</label>
<div class="tabName">
<input type="text" id="ffontName" class="input-text-file" value="Adobe Blank" autocomplete="off" spellcheck="false">
</div>
<input type="radio" id="tabFFontFile" name="tab-group-ffont" autocomplete="off">
<label for="tabFFontFile">File</label>
<div class="tabFile">
<input type="file" id="ffontFile" class="input-text-file" accept=".ttf, .otf, .woff, .woff2" autocomplete="off">
</div>
</div>
</div>
<div class="section">
Grid
</div>
<div class="gridInputs">
<div class="wrappable-input">
<label for="bitmapWidth">Bitmap width:</label>
<div class="input-number">
<input type="number" id="bitmapWidth" min="0" value="512" autocomplete="off">px
</div>
</div>
<div class="wrappable-input">
<label for="bitmapHeight">Bitmap height:</label>
<div class="input-number">
<input type="number" id="bitmapHeight" min="0" value="512" autocomplete="off">px
</div>
</div>
<div class="wrappable-input">
<label for="cellsRow">Cells per row:</label>
<div class="input-number">
<input type="number" id="cellsRow" min="0" value="16" autocomplete="off">px
</div>
</div>
<div class="wrappable-input">
<label for="cellsColumn">Cells per column:</label>
<div class="input-number">
<input type="number" id="cellsColumn" min="0" value="16" autocomplete="off">px
</div>
</div>
<div class="wrappable-input">
<label for="cellWidth">Cell width:</label>
<div class="input-number">
<input type="number" id="cellWidth" min="0" value="32" autocomplete="off">px
</div>
</div>
<div class="wrappable-input">
<label for="cellHeight">Cell height:</label>
<div class="input-number">
<input type="number" id="cellHeight" min="0" value="32" autocomplete="off">px
</div>
</div>
</div>
<div class="section">
Options
</div>
<div class="optionsInputs">
<div class="wrappable-input">
<label for="fontSize">Font size:</label>
<div class="input-number">
<input type="number" id="fontSize" min="0" value="14" autocomplete="off">pt
</div>
</div>
<div>
<input type="checkbox" id="clipCells" class="input-checkbox" autocomplete="off">
<label for="clipCells">Clip cells</label>
</div>
<div class="wrappable-input">
<label for="scale">Supersamplng:</label>
<select id="scale" class="input-select" autocomplete="off">
<option selected>none</option>
<option>x2</option>
<option>x4</option>
</select>
</div>
<div>
<input type="checkbox" id="smooth" class="input-checkbox" autocomplete="off" checked>
<label for="smooth">Smoothing</label>
</div>
<div class="wrappable-input">
<label for="offsetX">Offset X:</label>
<div class="input-number">
<input type="number" id="offsetX" value="0" autocomplete="off">px
</div>
</div>
<div class="wrappable-input">
<label for="offsetY">Offset Y:</label>
<div class="input-number">
<input type="number" id="offsetY" value="0" autocomplete="off">px
</div>
</div>
<div>
<input type="checkbox" id="showGrid" class="input-checkbox" autocomplete="off">
<label for="showGrid">Show grid</label>
</div>
</div>
<div class="filler"></div>
</div>
<div class="charset">
<label class="section" for="charset">Charset as string:</label>
<div class="input-textarea">
<textarea id="charset" autocomplete="off" spellcheck="false"> ☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{¦}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■□</textarea>
</div>
<div class="filler"></div>
</div>
<div class="footer">
<a href="https://www.jetbrains.com/webstorm/" target="_blank">webstorm</a>,
<a href="https://www.npmjs.com/" target="_blank">npm</a>,
<a href="https://sass-lang.com/" target="_blank">sass</a>,
<a href="https://github.com/DefinitelyTyped/DefinitelyTyped" target="_blank">definitelyTyped</a>,
<a href="https://github.com/jahredhope/promise-file-reader" target="_blank">promise-file-reader</a>,
<a href="https://github.com/dy/css-font" target="_blank">css-font</a>,
FontFace api,
<a href="https://github.com/typekit/webfontloader" target="_blank">webfontloader</a>,
<a href="https://github.com/necolas/normalize.css" target="_blank">normalize.css</a>,
<a href="https://fonts.google.com/" target="_blank">google fonts</a>,
<a href="https://github.com/calvinmetcalf/copyfiles" target="_blank">copyfiles</a>,
<a href="https://github.com/peaceiris/actions-gh-pages" target="_blank">gitHub pages action</a>,
<span><a href="https://github.com/shinnn/variation-selector-regex" target="_blank">@regexp-extra/variation-selector</a></span>,
service workers,
<a href="https://github.com/GoogleChrome/workbox" target="_blank">workbox</a>,
<a href="https://github.com/rollup/rollup" target="_blank">rollup</a>,
<a href="https://github.com/eligrey/FileSaver.js/" target="_blank">FileSaver.js</a>
</div>
<div class="messageBoxContainer template">
<div class="messageBox template">
<span id="messageBoxMessage">message</span>
<div>
<button type="button" id="messageBoxOk" class="input-button">ok</button>
<button type="button" id="messageBoxCancel" class="input-button template">cancel</button>
</div>
</div>
</div>
<script type="text/javascript" src="build/js/app.js"></script>
</body>
</html>