Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Dot Font

edited November 2011 in Code Sharing Posts: 21


  • BortelsBortels Mod
    Posts: 1,557

    I love it! Didn't even think of using arduino data - looks like an old punched-tape.

  • BortelsBortels Mod
    Posts: 1,557

    The problem you're having with "(" and those other characters is that string.find is interpreting them as part of a matching expression, rather than as a plain string. If you modify your find on line 166 to:

    k = string.find(self.chars, char, 1, true)

    Then those other characters should work (or at least left paren did for me...)

  • BortelsBortels Mod
    Posts: 1,557

    Looking closer - because your data is already in ASCII order, you can avoid all of that stuff after the find by simply going:

    k = string.byte(char) - 31

    I ran into exactly the same situation you did, and did exactly the same thing at first, when I was working on my vector fonts. So far as I can tell, that used to be "string.ascii", and when you google you still find the old usage as the first hit, and that fails.

  • SimeonSimeon Admin Mod
    Posts: 5,029

    Nice font, Alex. Looks awesome!

  • Thanks Bortels, now it can print all ASCII chars from SPACE to }.
    Chars with 126, 127 codes print arrows: -> and <-

  • NatNat
    Posts: 143

    Nice! I wrote something similar using font data from the ZX Spectrum (because I'm an old git)

Sign In or Register to comment.