-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathklfonttest.html
More file actions
209 lines (203 loc) · 10.2 KB
/
Copy pathklfonttest.html
File metadata and controls
209 lines (203 loc) · 10.2 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Font Display Test</title>
<link
rel="stylesheet"
as="style"
crossorigin
href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css"
/>
<style>
@font-face {
font-family: "Last Resort";
src:
local("Last Resort"),
url("LastResortHE-Regular.ttf") format("ttf"),
url("LastResort-Regular.ttf") format("ttf");
}
body {
font-family: Pretendard, sans-serif;
margin: 20px;
display: flex;
flex-direction: column;
align-items: center;
}
input {
width: 100%;
font-size: 32px;
}
.uniInput {
width: 15%;
}
.input-container {
display: flex;
align-items: center;
margin-bottom: 20px;
}
.font-display {
width: 100%;
max-width: 100%;
margin-bottom: 20px;
border: 1px solid #ccc;
font-size: 32px;
padding: 10px;
}
button {
padding: 10px 15px;
font-size: 16px;
margin-left: 5px; /* Space between input and button */
}
</style>
</head>
<body>
<div class="input-container">
<input type="text" id="textInput" placeholder="Type something..." style="font-family:'ScriptwideKyokashoCJK-A','ScriptwideKyokashoCJK-B','Klee One Semibold','LXGW WenKai TC','LXGW WenKai','Plan Kai A JP','Plan Kai B JP','Plan Kai G JP','Iansui','JyunsaiKaai','WenKai_MSARG','LXGW WenKai GB'"/>
<div class="uniInput">
<input type="text" id="unicodeInput" placeholder="4e00" style="font-family:monospace;" />
</div>
<button id="addCharButton" style="font-family:Inter;">Add Character</button>
</div>
<div class="font-display" style="font-family: 'Klee One SemiBold','Last Resort';">
[J] Klee One | <span id="fontKlee"></span>
</div>
<div class="font-display" style="font-family: 'LXGW WenKai','Last Resort';">
[J|G] LXGW WenKai | <span id="fontW"></span>
</div>
<div class="font-display" style="font-family: 'LXGW WenKai TC','Last Resort';">
[I] LXGW WenKai TC | <span id="fontWt"></span>
</div>
<div class="font-display" style="font-family: 'LXGW WenKai KR','Last Resort';">
[K] LXGW WenKai KR | <span id="fontWk"></span>
</div>
<div class="font-display" style="font-family: 'Pengli WenKai','Last Resort';">
[G] Pengli WenKai | <span id="fontPl"></span>
</div>
<div class="font-display" style="font-family: 'ChisugaShotai','Last Resort';">
[J] ChisugaShotai | <span id="fontCs"></span>
</div>
<div class="font-display" style="font-family: 'ChienChia F','Last Resort';">
[V|I] ChienChia | <span id="fontCc"></span>
</div>
<div class="font-display" style="font-family: 'YShiNewPen-Shuti','Last Resort';">
[I] YShiNewPen-Shuti | <span id="fontYs"></span>
</div>
<div class="font-display" style="font-family: 'YShiPen-ShutiCl','Last Resort';">
[I] YShiPen-ShutiCl | <span id="fontYc"></span>
</div>
<div class="font-display" style="font-family: 'YShiPen-ShutiCl S','Last Resort';">
[I] YShiPen-ShutiCl S | <span id="fontYl"></span>
</div>
<div class="font-display" style="font-family: 'YShiPen-ShutiTC','Last Resort';">
[I] YShiPen-ShutiTC | <span id="fontYt"></span>
</div>
<div class="font-display" style="font-family: 'Moon Stars Kai','Last Resort';">
[I] Moon Stars Kai | <span id="fontMs"></span>
</div>
<div class="font-display" style="font-family: 'WenKai_MSARG','Last Resort';">
[M] WenKai_MSARG | <span id="fontWm"></span>
</div>
<div class="font-display" style="font-family: 'Iansui','Last Resort';">
[I] Iansui | <span id="fontIa"></span>
</div>
<div class="font-display" style="font-family: 'JyunsaiKaai','Last Resort';">
[H] JyunsaiKaai | <span id="fontJy"></span>
</div>
<div class="font-display" style="font-family: 'BR Wakaisho','Last Resort';">
[A] BR Wakaisho | <span id="fontWa"></span>
</div>
<div class="font-display" style="font-family: 'LXGW WenKai GB','Last Resort';">
[G] LXGW WenKai GB | <span id="fontWg"></span>
</div>
<div class="font-display" style="font-family: 'Astalia','Last Resort';">
[J|T] Astalia | <span id="fontAs"></span>
</div>
<div class="font-display" style="font-family: 'Plan Kai A JP','Plan Kai B JP','Plan Kai G JP','Last Resort';">
[J] PlanKai JP | <span id="fontPj"></span>
</div>
<div class="font-display" style="font-family: 'Plan Kai A SC','Plan Kai B SC','Plan Kai G SC','Last Resort';">
[G] PlanKai SC | <span id="fontPg"></span>
</div>
<div class="font-display" style="font-family: 'ScriptwideKyokashoCJK-A','ScriptwideKyokashoCJK-B','Last Resort';">
[K|I] Scriptwide Kyokasho CJK | <span id="fontSc"></span>
</div>
<div class="font-display" style="font-family: 'LXGW ZhenKai GB','Last Resort';">
[G] LXGW ZhenKai GB | <span id="fontZG"></span>
</div>
<div class="font-display" style="font-family: 'LXGW ZhenKai','Last Resort';">
[J|G] LXGW ZhenKai | <span id="fontZI"></span>
</div>
<hr>
<p>This page is in the public domain. All fonts used are licensed under the OFL. See <a href="https://github.com/FishlandicFishy/cjk-utils">the GitHub repository</a>.</p>
<p><a href="https://github.com/orioncactus/pretendard">Pretendard (body font)</a> | <a href="https://github.com/unicode-org/last-resort-font">Last Resort (fallback font)</a> | <a href="https://fonts.google.com/specimen/Klee+One">Klee One</a> | <a href="https://github.com/lxgw/LxgwWenKai">LXGW WenKai</a> (<a href="https://github.com/lxgw/LxgwWenkaiTC">TC</a>, <a href="https://github.com/lxgw/LxgwWenkaiGB">GB</a>, <a href="https://github.com/lxgw/LxgwWenkaiKR">KR</a>) | <a href="https://github.com/lxgw/LxgwZhenKai">LXGW ZhenKai</a> | <a href="https://github.com/lxgw/Pengli">Pengli</a> | <a href="https://github.com/ChisugaMaeka/Chisuga-Shotai">ChisugaShotai</a> | <a href="https://github.com/Tsao-Tung/Chienchia">ChienChia</a> | <a href="https://github.com/Steve-Yuu/YshiPen-Shuti">YshiPen-Shuti</a> | <a href="https://github.com/GuiWonder/MoonStarsKai">Moon Stars Kai</a> | <a href="https://github.com/buwuzhengyedexiaoji/WenKai_MSARG">WenKai_MSARG</a> | <a href="https://github.com/ButTaiwan/iansui">Iansui</a> | <a href="https://github.com/ItMarki/jyunsaikaai">JyunsaiKaai</a> | <a href="https://github.com/BridgeRiver/BRWakaishotai">BR Wakaisho</a> | <a href="https://github.com/Des-Magmeta/PlanKai">PlanKai</a> | <a href="https://github.com/scriptwide-fonts/scriptwide-kyokasho-cjk">Scriptwide Kyokasho CJK</a></p>
<script>
const textInput = document.getElementById('textInput');
const unicodeInput = document.getElementById('unicodeInput');
const addCharButton = document.getElementById('addCharButton');
const fontKlee = document.getElementById('fontKlee');
const fontW = document.getElementById('fontW');
const fontWt = document.getElementById('fontWt');
const fontWk = document.getElementById('fontWk');
const fontWg = document.getElementById('fontWg');
const fontWm = document.getElementById('fontWm');
const fontWa = document.getElementById('fontWa');
const fontZG = document.getElementById('fontZG');
const fontZI = document.getElementById('fontZI');
const fontYs = document.getElementById('fontYs');
const fontYc = document.getElementById('fontYc');
const fontYl = document.getElementById('fontYl');
const fontYt = document.getElementById('fontYt');
const fontMs = document.getElementById('fontMs');
const fontIa = document.getElementById('fontIa');
const fontHy = document.getElementById('fontJy');
const fontPl = document.getElementById('fontPl');
const fontAs = document.getElementById('fontAs');
const fontPj = document.getElementById('fontPj');
const fontPg = document.getElementById('fontPg');
const fontSc = document.getElementById('fontSc');
const fontCc = document.getElementById('fontCc');
const fontCs = document.getElementById('fontCs');
textInput.addEventListener('input', updateFonts);
addCharButton.addEventListener('click', appendUnicodeChar);
function updateFonts() {
const inputText = textInput.value;
fontKlee.textContent = inputText;
fontW.textContent = inputText;
fontWt.textContent = inputText;
fontWk.textContent = inputText;
fontWg.textContent = inputText;
fontWm.textContent = inputText;
fontWa.textContent = inputText;
fontZI.textContent = inputText;
fontZG.textContent = inputText;
fontMs.textContent = inputText;
fontYs.textContent = inputText;
fontYc.textContent = inputText;
fontYl.textContent = inputText;
fontYt.textContent = inputText;
fontIa.textContent = inputText;
fontJy.textContent = inputText;
fontPl.textContent = inputText;
fontAs.textContent = inputText;
fontPj.textContent = inputText;
fontPg.textContent = inputText;
fontSc.textContent = inputText;
fontCc.textContent = inputText;
fontCs.textContent = inputText;
}
function appendUnicodeChar() {
const hexCode = unicodeInput.value.trim();
if (hexCode.match(/^[0-9A-Fa-f]{1,6}$/)) {
const char = String.fromCodePoint(parseInt(hexCode, 16));
textInput.value += char;
updateFonts();
unicodeInput.value = ''; // Clear the input after adding
} else {
alert('Please enter a valid hexadecimal codepoint (e.g. 4e00).');
}
}
</script>
</body>
</html>