Avatar for NebbishHacker

NebbishHacker

Member since Apr 2020 • Last active Jun 2020
  • 3 conversations
  • 43 comments

Most recent activity

  • in Bangle.js
    Avatar for NebbishHacker

    Most likely the RAM widget is changing the text alignment. Best practice is to call g.reset() before you start drawing in order to reset the graphics object to a known state.

  • in Bangle.js
    Avatar for NebbishHacker

    I'm seeing the same issue. It looks to me like marked.min.js isn't always loaded by the time that index.js tries to use it.

    https://espruino.github.io/BangleApps/ seems to be working a bit better.

  • in Bangle.js
    Avatar for NebbishHacker

    You can calculate the amount of ram a buffer will take up as width*height*bpp/8.

    A 240x192 2bpp buffer takes up 11952 bytes, or about 12kb. If you halve the size to 120x96 you can fit quadruple the bit depth (8bpp) in the exact same amount of space.

    Using multiple buffers should work fine - I was actually just experimenting with that the other night.

  • in Bangle.js
    Avatar for NebbishHacker

    After a bit more fiddling, I've decided that it's not worth changing the grid just for the minor tweaks I was considering.

    In terms of the accented chars, it's a trade-off since the extra code needed for them takes up quite a lot of space too,

    By my math directly including the accented chars would take up a bit over a kilobyte. I'm guessing the extra code likely takes up less space than that?

  • in Bangle.js
    Avatar for NebbishHacker

    You don't need to call g.clear(), since you're just going to overwrite the entire screen with the contents of the buffer. If you remove that line the flicker should go away.

  • in General
    Avatar for NebbishHacker

    Nice, looks like a good solution :)

  • in Bangle.js
    Avatar for NebbishHacker

    W and @ would have to be squished a bit, but I think everything else would fit as is. Mostly I just want to make a few things like the parentheses sit a bit higher. In any case, I'll experiment a bit more to see if it seems like a change worth making.

    I was also pondering if it might be better in the long run to include all the accented characters directly.

    Pros:

    • simpler font rendering
    • more direct control over the appearance of said characters
    • would make it relatively easy to support custom vector fonts, since all the information required to render a font would be contained in one array + a few parameters

    Cons:

    • space usage

    On a related note, would it make sense to store the font in a compressed form? It has a lot of small repeated elements so I think it should compress fairly well, but I guess compression would make it harder to index into it and access individual characters.

  • in Bangle.js
    Avatar for NebbishHacker

    I'm afraid I can't make the angled line on the R thicker without making it entirely too thick, due to the limitation of the grid.

    The small s was really tricky to design on the grid. I've attached a version that's a bit thinner and arguably more rounded, but I'm not really sure if I like it more... it ends up looking kind of slanted or skewed to me.

  • in Bangle.js
    Avatar for NebbishHacker

    I've added ¡¢£¤¥¨©«¬®¯°±´µ·¸»¼½¾¿ÆÇÐ×ØÞßæçð÷øþ. I also added a dotless i to the accent list.

    At this point the accent handling code should only have to handle the accents ◌̀◌́◌̂◌̃◌̈.

    The only ISO 8859-1 symbols still missing are §ª²³¶¹º.

    @Gordon, would it work to give each letter a something like a 14x18 grid instead of the 16x16 grid, and encode the points as x+y*14? After seeing the font in action there's a few symbols that I think would benefit from a bit more vertical space.

Actions