-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathglyph.html
102 lines (92 loc) · 3.76 KB
/
glyph.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>fonts</title>
<style>
@font-face {
font-family: 'acil_lujot';
src: url("acil_lujot/acil_lujot.woff");
}
:lang(x-acil-lujot) {
font-family: 'acil_lujot';
}
@font-face {
font-family: 'xedixel';
src: url("xedixel/xedixel.woff");
}
:lang(x-xedixel) {
font-family: 'xedixel';
}
@font-face {
font-family: 'cutapijot';
src: url("cutapijot/cutapijot.woff");
}
:lang(x-cutapijot) {
font-family: 'cutapijot';
}
</style>
</head>
<body>
<p id="view0" lang="x-acil-lujot"><span style="font-size: 48px;">PBM CSXZ TDNL KGHAEUIO 1234567890.,!?-"()/</span></p>
</div>
<details style="margin: 30px auto;" open>
<summary><b>書体見本</b></summary>
<p id="view1" lang="x-acil-lujot"><span style="font-size: 12px;">MUGAXIJU E BELPIC? MAK-MAK DOKTIT NUWAXECLETI
"ZO". HATA,
SETIJA! 1234567890</span></p>
<p id="view2" lang="x-acil-lujot"><span style="font-size: 16px;">MUGAXIJU E BELPIC? MAK-MAK DOKTIT NUWAXECLETI
"ZO". HATA,
SETIJA! 1234567890</span></p>
<p id="view3" lang="x-acil-lujot"><span style="font-size: 20px;">MUGAXIJU E BELPIC? MAK-MAK DOKTIT NUWAXECLETI
"ZO". HATA,
SETIJA! 1234567890</span></p>
<p id="view4" lang="x-acil-lujot"><span style="font-size: 28px;">MUGAXIJU E BELPIC? MAK-MAK DOKTIT NUWAXECLETI
"ZO". HATA,
SETIJA! 1234567890</span></p>
<p id="view5" lang="x-acil-lujot"><span style="font-size: 32px;">MUGAXIJU E BELPIC? MAK-MAK DOKTIT NUWAXECLETI
"ZO". HATA,
SETIJA! 1234567890</span></p>
<p id="view6" lang="x-acil-lujot"><span style="font-size: 40px;">MUGAXIJU E BELPIC? MAK-MAK DOKTIT NUWAXECLETI
"ZO". HATA,
SETIJA! 1234567890</span></p>
<p id="view7" lang="x-acil-lujot"><span style="font-size: 48px;">MUGAXIJU E BELPIC? MAK-MAK DOKTIT NUWAXECLETI
"ZO". HATA,
SETIJA! 1234567890</span></p>
</details>
<div>
<div>
<label for="input">webフォントで好きな文章を試すことができます</label>
<select id="font_select" style="font-size: 20px">
<option>acil_lujot</option>
<option>xedixel</option>
<option>cutapijot</option>
</select>
<input id="input" type="text" placeholder="LUCUCLETI E PANKA PI AUC E PANKA" maxlength="50"
style="font-size: 32px; width: 80%;">
</div>
<div>
<p id="output" lang="x-acil-lujot" style="font-size: 48px; min-height: 1em;">LUCUCLETI E PANKA PI AUC E
PANKA</p>
</div>
</div>
<script>
const input = document.getElementById("input");
const output = document.getElementById("output");
input.addEventListener("input", (e) => output.innerHTML = input.value);
const font_select = document.getElementById('font_select');
font_select.addEventListener('change', (e) => {
const valid_lang_name = {
"acil_lujot": "x-acil-lujot",
"xedixel": "x-xedixel",
"cutapijot": "x-cutapijot"
}[e.target.value];
output.lang = valid_lang_name;
for (let i = 0; i < 8; i++) {
document.getElementById(`view${i}`).lang = valid_lang_name;
}
});
</script>
</body>
</html>