-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
283 lines (272 loc) · 12.9 KB
/
Copy pathindex.html
File metadata and controls
283 lines (272 loc) · 12.9 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
<!DOCTYPE html>
<html lang="en">
<head><!--邊邉-->
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Source Han Mapping">
<meta name="keywords" content="Source Han, font, CJK, mapping, region, regional difference">
<meta name="author" content="NightFurySL2001">
<meta property="og:title" content="Source Han Mapping" />
<meta property="og:description" content="Tool to view mapping for (CJK) characters in Source Han fonts" />
<meta property="og:type" content="text" />
<meta property="og:url" content="https://nightfurysl2001.github.io/shs-cid/" />
<title>Source Han Mapping</title>
<link rel="stylesheet" href="css/cid-colour.css">
<link rel="stylesheet" href="css/nav.css">
<link rel="stylesheet" href="css/cid.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/nightfurysl2001/s-h-sans-webfont@release/index.min.css" id="font-sheet-sans">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/nightfurysl2001/s-h-serif-webfont@release/index.min.css" id="font-sheet-serif">
<style>
:root {
font-family: sans-serif;
--preview-font-size: 10em;
--preview-gap: 2.5em;
--preview-sans-fallback: "Source Han Sans";
--preview-sans-fallback-forceJP: "Source Han Sans";
--preview-sans-fallback-forceKR: "Source Han Sans K";
--preview-sans-fallback-forceCN: "Source Han Sans CN";
--preview-sans-fallback-forceTW: "Source Han Sans TW";
--preview-sans-fallback-forceHK: "Source Han Sans HK";
--preview-serif-fallback: "Source Han Serif";
--preview-serif-fallback-forceJP: "Source Han Serif";
--preview-serif-fallback-forceKR: "Source Han Serif K";
--preview-serif-fallback-forceCN: "Source Han Serif CN";
--preview-serif-fallback-forceTW: "Source Han Serif TW";
--preview-serif-fallback-forceHK: "Source Han Serif HK";
--preview-font-family: var(--preview-sans-fallback);
--preview-font-forceJP: var(--preview-sans-fallback-forceJP);
--preview-font-forceKR: var(--preview-sans-fallback-forceKR);
--preview-font-forceCN: var(--preview-sans-fallback-forceCN);
--preview-font-forceTW: var(--preview-sans-fallback-forceTW);
--preview-font-forceHK: var(--preview-sans-fallback-forceHK);
--preview-font-weight: 400;
}
.intro {
display: block;
padding: 2em;
font-style: italic;
}
.font-choice {
padding-top: 0.5em;
}
.vert {
font-feature-settings: "vert";
}
.fw {
font-variant-east-asian: full-width;
}
.hw {
font-feature-settings: "hwid";
}
.jp90 {
font-feature-settings: "jp90";
}
.hist {
font-feature-settings: "hist";
}
.searchbar input{
display: block;
padding: 1em;
height: 3.5em;
width: 100%;
box-sizing: border-box;
}
#loading-warning{
position: absolute;
right: .5em;
border: 5px dashed red;
color: red;
font-weight: bold;
padding: 0.5em 1em;
background-color: white;
z-index: 1000;
}
#loading-warning[data-status="shown"]{
opacity: 1;
}
#loading-warning[data-status="hidden"]{
opacity: 0;
transition: opacity 2s ease-out;
}
footer {
max-width: 100%;
margin: auto;
text-align: center;
}
footer span {
display: block;
font-style: italic;
}
footer span a {
text-decoration: none;
}
</style>
</head>
<body>
<nav>
<div class="nav-wrapper">
<span class="nav-title">Source Han Mapping</span>
<ul id="nav-mobile" class="nav-right">
<a href="https://github.com/adobe-fonts/source-han-sans">SHSans</a>
<a href="https://github.com/adobe-fonts/source-han-serif">SHSerif</a>
<a href="https://github.com/NightFurySL2001/shs-cid">GitHub</a>
</ul>
</div>
</nav>
<div id="loading-warning">Loading version files...</div>
<div class="header">
<div class="searchbar">
<input id="searchtext" type="text" placeholder="Search ideographs..." onchange="updateRows()">
</div>
<div class="font-choice">
<button class="btnFont" data-font-style="sans">Sans</button>
<button class="btnFont" data-font-style="serif">Serif</button>
<span>
<strong>Version:</strong>
<select id="version">
<option>release</option>
</select>
可用 <raw>U+XXXX</raw> 格式输入统一码字符 <em>Use <raw>U+XXXX</raw> to input Unicode codepoints</em>
</span>
</div>
<div class="font-choice">
<label>
<strong>字重 Weight:</strong>
<input type="range" min="200" max="900" value="400" class="slider" id="text-weight" name="text-weight" data-index="0" data-property="--preview-font-weight">
<input type="number" class="slider-output" data-index="0" value="400" style="width: 8ch">
</label>
<label style="margin-left:2em;">
<strong>字号 Font Size:</strong>
<input type="range" min="1" max="50" value="10" class="slider" id="text-size" name="text-size" data-index="1" data-property="--preview-font-size" data-unit="em">
<input type="number" class="slider-output" data-index="1" value="10" style="width: 4ch">
</label>
<br>
<label>
<input type="checkbox" id="outline-toggle" onchange="toggleRowDisplayClass(this, 'outline-text')">
<strong>字体描边 Outline Text</strong>
</label>
<label style="margin-left:2em;">
<input type="checkbox" id="outline-toggle" onchange="toggleRowDisplayClass(this, 'coloured-text')" checked>
<strong>颜色 Colour</strong>
</label>
<label style="margin-left:2em;">
<input type="checkbox" id="outline-toggle" onchange="toggleRowDisplayClass(this, 'dark-mode')">
<strong>暗黑模式 Dark Mode</strong>
</label>
</div>
<!-- <div id="warning-banner">
已知问题:网页字体在共用字形的码位上可能出现问题(如 U+2FBB),请以右上角的字形数据(或汉字颜色)判断是否显示正确的字形。 <br>
Known issue: Webfont might not display correctly on codepoints with glyph sharing e.g. U+2FBB. Please refer to the character data on the top right (or hanzi colour) to determine if the character is displayed correctly.
<br>
<button id="warning-banner-close">OK, 隐藏 hide this</button>
</div> -->
</div>
<div id="rows-display" class="coloured-text">
</div>
<footer>
<span>Copyright © 2023-2025 NightFurySL2001/夜煞之乐2001</span>
<span>If you like this, please help support me at <a href="https://paypal.me/nightfurysl2001">PayPal</a> or <a href="https://ko-fi.com/nightfurysl2001">Ko-fi</a></span>
<span>如果您喜欢这个专案,请在 <a href="https://paypal.me/nightfurysl2001">PayPal</a> 或 <a href="https://ko-fi.com/nightfurysl2001">Ko-fi</a> 上支援我,感激不尽~</span>
<span>Report page issues on <a href="https://github.com/NightFurySL2001/shs-cid">GitHub</a> 上可提报本页面的错误</span>
<br>
<span>Data from Source Han projects 数据来源于思源计划</span>
<span>Idea from 灵感来源 <a href="https://github.com/tamcy">@tamcy</a></span>
</footer>
<template id="sample-row">
<div class="row">
<div class="row-header">
<span class="row-unicode"></span>
<span class="row-disp-char"></span>
<span class="row-block"></span>
</div>
<div class="cids">
<div class="cid ">
<div class="cid-locale">
<span class="cid-lang">JP</span><span class="cid-equiv"></span>
<br>
</div>
<span class="cid-char" lang="ja"></span>
<div class="cid-info">
<span class="cid-name"></span>
<span class="cid-cid"></span>
</div>
</div>
<div class="cid ">
<div class="cid-locale">
<span class="cid-lang">KR</span><span class="cid-equiv"></span>
<br>
</div>
<span class="cid-char" lang="ko"></span>
<div class="cid-info">
<span class="cid-name"></span>
<span class="cid-cid"></span>
</div>
</div>
<div class="cid ">
<div class="cid-locale">
<span class="cid-lang">CN</span><span class="cid-equiv"></span>
<br>
</div>
<span class="cid-char" lang="zh-CN"></span>
<div class="cid-info">
<span class="cid-name"></span>
<span class="cid-cid"></span>
</div>
</div>
<div class="cid ">
<div class="cid-locale">
<span class="cid-lang">TW</span><span class="cid-equiv"></span>
<br>
</div>
<span class="cid-char" lang="zh-TW"></span>
<div class="cid-info">
<span class="cid-name"></span>
<span class="cid-cid"></span>
</div>
</div>
<div class="cid ">
<div class="cid-locale">
<span class="cid-lang">HK</span><span class="cid-equiv"></span>
<br>
</div>
<span class="cid-char" lang="zh-HK"></span>
<div class="cid-info">
<span class="cid-name"></span>
<span class="cid-cid"></span>
</div>
</div>
</div>
</div>
</template>
<template id="sample-cell">
<div class="cid ">
<div class="cid-locale"></div>
<span class="cid-char" lang="ja"></span>
<div class="cid-info">
<span class="cid-name"></span>
<span class="cid-cid"></span>
</div>
</div>
</template>
</body>
<!-- <script src="js/control.js"></script> -->
<script src="https://cdn.jsdelivr.net/gh/NightFurySL2001/shs-cid/js/control.min.js"></script>
<script>
// focus on search input on press slash
document.getElementById('searchtext').focus();
document.addEventListener('keydown', function (e) {
if (e.key === '/') {
e.preventDefault();
document.getElementById('searchtext').focus();
}
});
const rowDisplayElement = document.getElementById('rows-display');
function toggleRowDisplayClass(el, className) {
if (el.checked) {
rowDisplayElement.classList.add(className);
} else {
rowDisplayElement.classList.remove(className);
}
}
</script>
</html>