forked from astiopin/webgl_fonts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
66 lines (66 loc) · 2.13 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>WebGL Font Rendering Demo</title>
</head>
<body>
<div align="center">
<div>
<h1>WebGL Font Rendering</h1>
<a href="https://github.com/mate-h/webgl-fonts">
Click for the source </a
><br /><br />
</div>
<canvas width="700" height="400" id="glcanvas"></canvas>
<div style="padding: 10px">
<table width="400">
<tr>
<td>Font</td>
<td>
<select id="fonts">
<option value="roboto">Roboto</option>
<option value="roboto-bold">Roboto Bold</option>
<option value="ubuntu">Ubuntu</option>
<option value="ubuntu-bold">Ubuntu Bold</option>
<option value="dejavu-serif">DejaVu Serif</option>
<option value="dejavu-serif-italic">DejaVu Serif Italic</option>
<option value="sf-mono">SF Mono</option>
<option value="inter">Inter</option>
<option value="inter-tight-bold">Inter Tight Bold</option>
</select>
</td>
</tr>
<tr>
<td>Font size</td>
<td>
<input id="font_size" type="number" min="5" max="30" value="10" />
</td>
</tr>
<tr>
<td>Font hinting</td>
<td>
<input id="font_hinting" type="checkbox" checked="checked" />
</td>
</tr>
<tr>
<td>Subpixel rendering</td>
<td><input id="subpixel" type="checkbox" checked="checked" /></td>
</tr>
<tr>
<td>Font color</td>
<td><input id="font_color" type="color" value="#1a1a1a" /></td>
</tr>
<tr>
<td>Background color</td>
<td>
<input id="background_color" type="color" value="#e5e5e5" />
</td>
</tr>
</table>
</div>
<div><textarea cols="80" rows="20" id="text"></textarea></div>
</div>
<script src="./src/main.ts" type="module"></script>
</body>
</html>