Last active
August 4, 2017 06:35
-
-
Save kurgm/1b5bb96f744a130cdbb58ee7cefb689b to your computer and use it in GitHub Desktop.
GlyphWiki変体仮名グリフのテストページ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>変体仮名テスト</title> | |
<style> | |
.kana { | |
font-family: gwhentaigana, serif; | |
} | |
input.kana { | |
font-size: 30pt; | |
width: 100%; | |
} | |
.btn { | |
display: inline-block; | |
margin: 2px; | |
padding: 1px; | |
background-color: #CCCCFF; | |
color: #000000; | |
border: 1px solid #3333CC; | |
cursor: pointer; | |
font-size: 15pt; | |
} | |
@font-face { | |
font-family: gwhentaigana; | |
font-weight: normal; | |
src: url("gwhentaigana.woff"); | |
} | |
</style> | |
</head> | |
<body> | |
<h1>グリフウィキ変体仮名グリフのテスト</h1> | |
<div> | |
<a href="https://glyphwiki.org/wiki/">グリフウィキ</a>で作成された変体仮名を入力できるページです。濁点・半濁点はうまく表示されないかもしれません。 | |
</div> | |
<input type="text" placeholder="テキストを入力" value="𛁛𛂦゙" class="kana" id="con"> | |
<div> | |
<script> | |
var kana_start = 0x1b001; | |
var kana_end = 0x1b11e; | |
for (var i = kana_start; i <= kana_end; i++) { | |
document.write( | |
"<div onclick='clickBtn(this)' class='btn kana'>" + | |
"&#x" + i.toString(16) + ";" + | |
"</div>" | |
); | |
} | |
function clickBtn(div) { | |
var char = div.textContent || div.innerText; | |
document.getElementById("con").value += char; | |
document.getElementById("con").focus(); | |
return false; | |
} | |
</script> | |
<div class="btn kana" onclick="clickBtn({textContent:'\u3099'})">゛</div> | |
<div class="btn kana" onclick="clickBtn({textContent:'\u309a'})">゜</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment