summaryrefslogtreecommitdiff
path: root/unicode/test.html
diff options
context:
space:
mode:
Diffstat (limited to 'unicode/test.html')
-rw-r--r--unicode/test.html41
1 files changed, 41 insertions, 0 deletions
diff --git a/unicode/test.html b/unicode/test.html
new file mode 100644
index 0000000..0c964b9
--- /dev/null
+++ b/unicode/test.html
@@ -0,0 +1,41 @@
+<link rel="stylesheet" href="../fixedsys-excelsior/fsex300.css" type="text/css" charset="utf-8" />
+<style type="text/css">
+body{font-size:16pt;}
+u { color: #888; }
+</style>
+
+<script src="fixedsys-raw.js"></script>
+<script src="unicode-block.js"></script>
+<script>
+function paginate (a, n){
+ var aa = [], ai, i = 0
+ while (i < 100) {
+ ai = a.slice(i * n, (i+1) * n)
+ if (! ai.length) break
+ aa.push(ai)
+ i++
+ }
+ return aa.map(function(k){ return "&#" + k.join(";&#") + ";" }).join("<br>")
+}
+requestAnimationFrame(function(){
+ var ranges = unicode_blocks.findGroups(fixedsys_characters)
+ console.log(ranges)
+ ranges.forEach(function(row){
+ var r = document.createElement("div")
+ var html = ""
+ html = "<u>" + row[2] + ": " + row[0].toString(16) + " .. " + row[1].toString(16) + "</u>"
+ html += "<br>"
+ html += "<br>" + paginate(row[3], 32)
+ html += "<br>"
+ html += "<br>"
+ r.innerHTML = html
+ document.body.appendChild(r)
+ })
+})
+
+window.onmouseup = function(){
+ var s = window.getSelection().toString()
+ console.log(s.charCodeAt(0), s.charCodeAt(s.length-1))
+}
+</script>
+