You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Thanks! Yes, I think those probably make more sense given the number of pixels. I'll add that font in now (as Font4x8Numeric)

    For anyone who is interested in trying stuff like this, here's the code I used to make the font:

    var font = ""+
        "### "+
        "# # "+
        "# # "+
        "# # "+
        "# # "+
        "# # "+
        "# # "+
        "### "+
        " #  "+
        " #  "+
        " #  "+
        " #  "+
        " #  "+
        " #  "+
        " #  "+
        " #  "+
        "### "+
        "  # "+
        "  # "+
        " ## "+
        "##  "+
        "#   "+
        "#   "+
        "### "+
        "### "+
        "  # "+
        "  # "+
        " ## "+
        "  # "+
        "  # "+
        "  # "+
        "### "+
        "# # "+
        "# # "+
        "# # "+
        "### "+
        "  # "+
        "  # "+
        "  # "+
        "  # "+
        "### "+
        "#   "+
        "#   "+
        "##  "+
        " ## "+
        "  # "+
        "  # "+
        "### "+
        "### "+
        "#   "+
        "#   "+
        "### "+
        "# # "+
        "# # "+
        "# # "+
        "### "+
        "### "+
        "  # "+
        "  # "+
        "  # "+
        "  # "+
        "  # "+
        "  # "+
        "  # "+
        "### "+
        "# # "+
        "# # "+
        "### "+
        "# # "+
        "# # "+
        "# # "+
        "### "+
        "### "+
        "# # "+
        "# # "+
        "### "+
        "  # "+
        "  # "+
        "  # "+
        "### ";
    
    var fdata = "";
    for (var col=0;col<font.length/8;col++) {
      var i = (col&3)+((col&~3)<<3);
      console.log(i);
      fdata += String.fromCharCode(
        (font[i   ]==" "?0:128)|
        (font[i+ 4]==" "?0:64)|
        (font[i+ 8]==" "?0:32)|
        (font[i+12]==" "?0:16)|
        (font[i+16]==" "?0:8)|
        (font[i+20]==" "?0:4)|
        (font[i+24]==" "?0:2)|
        (font[i+28]==" "?0:1));
    }
    // ...
     g.setFontCustom(fdata, "0".charCodeAt(0), 4, 8);
    

    As it happens I forgot that the font data is column-ordered. If I'd originally made the characters at right-angles to where they are, the code for it would have been amazingly simple.

About

Avatar for Gordon @Gordon started