Select Git revision
lettertester.html
lettertester.html 7.67 KiB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Font tester</title>
</head>
<body>
<canvas id="cvs" width="1000">
Your browser doesn't support canvas.
</canvas>
<input type="text" id="txtinput">
<script>
// Inspired by https://github.com/PaulBGD/PixelFont
const fntA = [
[, , 1, 1, 1, 1],
[, 1, 1, , , 1, 1],
[, 1, 1, , , 1, 1],
[, 1, 1, , , 1, 1],
[, 1, 1, 1, 1, 1, 1],
[, 1, 1, , , 1, 1],
[, 1, 1, , , 1, 1],
];
const fntB = [
[, 1, 1, 1, 1, 1],
[, 1, 1, , , 1, 1],
[, 1, 1, , , 1, 1],
[, 1, 1, 1, 1, 1],
[, 1, 1, , , 1, 1],
[, 1, 1, , , 1, 1],
[, 1, 1, 1, 1, 1],
];
const fntC = [
[, , 1, 1, 1, 1],
[, 1, 1, , , 1, 1],
[, 1, 1],
[, 1, 1],
[, 1, 1],
[, 1, 1, , , 1, 1],
[, , 1, 1, 1, 1]
];
const fntD = [
[, 1, 1, 1, 1, 1],
[, 1, 1, , , 1, 1],
[, 1, 1, , , 1, 1],
[, 1, 1, , , 1, 1],
[, 1, 1, , , 1, 1],
[, 1, 1, , , 1, 1],
[, 1, 1, 1, 1, 1]
];
const fntE = [
[, , 1, 1, 1, 1, 1],
[, 1, 1, 1, 1, 1, 1],
[, 1, 1],
[, 1, 1, 1, 1, 1],
[, 1, 1],
[, 1, 1, 1, 1, 1, 1],
[, , 1, 1, 1, 1, 1],