Basically if you update the width, height, and 7 segment image at the top:
var W = 7; // width +1 for empty column
var H = 11;
var base = `
aaaa
f b
f b
f b
f b
gggg
e c
e c
e c
e c
dddd `;
Then run the code on Espruino it'll generate a font for you that matches the image you gave.
It could be a nice way of coming up with stylised fonts of exactly the right size, and nothing stops someone improving the digits array to include the full character set :)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi,
I just added some simple 7 segment font types- check out http://www.espruino.com/Fonts#font-modules
However, there's now some 'font maker' code which is included in the (unminified) font comments at https://github.com/espruino/EspruinoDocs/blob/master/modules/Font5x7Numeric7Seg.js
Basically if you update the width, height, and 7 segment image at the top:
Then run the code on Espruino it'll generate a font for you that matches the image you gave.
It could be a nice way of coming up with stylised fonts of exactly the right size, and nothing stops someone improving the
digits
array to include the full character set :)