design/testdata/fonts.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body >
<table>
<tr>
<td id="arial" style="font-family: Arial; font-size: 12px">Arial 12px<br>
</td>
</tr>
</table>
<script>
function box(txt, id) {
span = document.createElement("span");
span.id = id
span.innerHTML = txt
return span
}
function add(el, prefix) {
p = document.getElementById(prefix)
p.appendChild(document.createTextNode("'"))
p.appendChild(el)
n = document.createTextNode("': " + document.getElementById(el.id).offsetWidth+ ",")
p.appendChild(n)
p.appendChild(document.createElement("br"))
}
function fsize(prefix) {
for (var i = 33; i < 255; i++) {
id = prefix+"_"+i
span = box(String.fromCharCode(i), id)
add(span, prefix)
}
add(box(" ", "space"), prefix)
}
fsize("arial")
</script>
</body>
</html>