Avatar for NebbishHacker

NebbishHacker

Member since Apr 2020 • Last active May 2020
  • 3 conversations
  • 37 comments

Most recent activity

  • 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.

  • in General
    Avatar for NebbishHacker

    You can make the letters overlap by passing a negative spacing into the function I posted:

    drawStringWithSpacing("foo", 0, 0, -1);
    
  • in Bangle.js
    Avatar for NebbishHacker

    @MaBe I'm just using Inkscape.

    @Gordon I'm not sure if I'm the best judge of what's used much... I'll do my best though. I should have some time to work on it more tonight.

    I'm a bit confused about code pages, by the way. The Espruino fonts page says it uses ISO8859-1 / the first 255 code points of Unicode, and then mentions the Euro symbol, which neither of those contain. The FontDylex7x13 font appears to be using the Windows-1252 code page - is that where the Euro symbol comes from?

  • in General
    Avatar for NebbishHacker

    Here's a method to draw some text with whatever adjustment to the spacing you want:

    function drawStringWithSpacing(text, x, y, spacing) {
      for (var char of text) {
        g.drawString(char, x, y);
        x += g.stringWidth(char) + spacing;
      }
    }
    
  • in Bangle.js
    Avatar for NebbishHacker

    I can add those. ß is currently mapped to B, but it should probably be its own character. The same goes for some of the other non-ascii characters, like ash and thorn.

    @Gordon - would you like me to go ahead and add the rest of the ISO-8859-1 code page?

  • in Bangle.js
    Avatar for NebbishHacker

    Nice! It's great to see this in the emulator :)

    What is your feeling about font sizing?

    It might be nice to stay visually similar to the old font, so that people don't have to adjust their existing code as much. Is it smaller because you're leaving room for diacretics? (Edit: nevermind, diacritics do not appear to be included in the font height.)

    By the way, I notice that there appears to be missing vertices in a lot of characters. Did you by any chance use svg2bangle with default settings for the initial conversion? If so, you should make sure you run it with the error tolerance set to 0 so that it doesn't do any unwanted simplification.

  • in Bangle.js
    Avatar for NebbishHacker

    I agree that there is no general rule that will always feel "right".

    45 degree edges in particular are ambiguous because the edge will always pass directly through the center of each pixel. Take the first square in the attached image, with two triangles sharing an edge - should the pixels along the edge (marked in yellow) be part of the first triangle, or the second?

    One way to remove the ambiguity would be to offset the edge by a fraction of a pixel, as shown in the second square - but that would require fillPoly to accept fractional coordinates.

Actions