Live data from Hacker News

I Created 175 Fonts Using Rust

chevyray.dev

31–40 of 117 posts

Re: I Created 175 Fonts Using Rust

#32

These look absolutely delightful! A quick question: I'm working on retro consoles, and so I need fonts where each glyph is a multiple of 8px wide for easy display on tile-based backgrounds. Are the sizes (in pixels) of your font packs listed anywhere?

Check out The Ultimate Oldschool PC Font Pack (https://int10h.org/oldschool-pc-fonts/). Each font description includes glyph dimensions and aspect ratios

Re: I Created 175 Fonts Using Rust

#34

This is neat! And cool to hear this made a financial difference for them. Gah, I remember the name Chevy Ray from indie games, but I cannot put my finger on what this person made… would have been like 2010 to 2012? In the same vein as VVVVVV or nidhogg or canabalt as I recall

The game you are probably talking about is Beacon.

Re: I Created 175 Fonts Using Rust

#35

What an amazing accomplishment! Bravo. I find typography resists my attempts to wrap my head around it, because even though I can do basic analysis like serif vs sans serif, I get a sort of brain fog when it comes to telling fonts apart or intuiting which fonts to use in different situations. It's really hard to wrap my head around the idea that one person could make 175 fonts and that they would each be meaningfully…

Sometimes I would get pretty far into a new font only to realize it was almost a total copy of another. It happened, I just managed to notice before releasing them lol

Re: I Created 175 Fonts Using Rust

#36
post #12

Nice work I would like microns on the vowles, as we type a lot of Māori words....

Is a micron the name of the straight line over the 'a' in Māori? A single pixel line over a bunch of a's is tremendously simple to do in pixel fonts, I could probably add that to all the fonts in a day... hmmmm

Re: I Created 175 Fonts Using Rust

#37

This is really excellent work, and a great write-up. I think it would definitely be possible to speed up a lot of the algorithms with some tricks. Replacing hashmaps with bitmaps and byte-index arrays for character painting and ascii-to-variants seems like a lead, based on what I've read. Of course, that doesn't really matter for this code since it's already fast enough.

Glad you brought this up, because it's absolutely true! All the code is not on the site, but I actually allocate and clone a lot of strings and data structures as well. I did optimal code where it was obvious (bitmap copying, easily parallelizable things), and it was SO instant that I didn't even bother trying to optimize the other things. But it could be done!

It's easy to forget how fast on-the-ground languages like Rust and C++ and Go are, not to mention when you use their multi-threading primitives and worker queues/etc.

Re: I Created 175 Fonts Using Rust

#38
post #8

Impressive indeed. Making a complete font set can easily take as long as a year. The tasks include to go from 'A' to 'Z', upper and lower case, plus all the glyphs (brackets, ampersand, exclamation marks etc). Optionally the variations (bold, italic etc) without which a font is of limited use. The thing that separates the men from the boys is the kerning (spacing between the characters) which can absorb as much obses…

Making a complete font set can easily take as long as a year. Making a font family can easily be a lifelong project.

It makes me very happy to see people talking about how much work can go into a typeface. Like, these pixel fonts are very quick to make, but fully contoured vector fonts can be tweaked to perfection infinitely, there's always more languages and more diacritics and more weights and styles you could do.

Truly a rabbit hole, but when it's done well it's very worthwhile. I have a lot of respect for font makers.

Re: I Created 175 Fonts Using Rust

#39

What an amazing accomplishment! Bravo. I find typography resists my attempts to wrap my head around it, because even though I can do basic analysis like serif vs sans serif, I get a sort of brain fog when it comes to telling fonts apart or intuiting which fonts to use in different situations. It's really hard to wrap my head around the idea that one person could make 175 fonts and that they would each be meaningfully…

Actually it is impossible to recreate the same font from memory. Even if you tried the font would be in some ways different. With pixel fonts where the grid is very coarse its much easier to do but normal fonts with curves you wont make it. Even if you are using same image of a font as a reference.

Re: I Created 175 Fonts Using Rust

#40
post #26

Earlier quoted context omitted.

The stronger guarantees/performance fall out of the stronger lifetime/ownership model, combined with errors around ambiguous/invalid lifetimes being a compiler error. In other languages those violations are things you have to run a race detector and actually evoke the condition to find, or you abandon fine grained/tracked ownership and use garbage collection.

None of that matters with this code. There are no lifetimes here and in fact there is no ownership either. Everything is a primitive char. They’re always copied and no mutation occurs. It’s pure computation. You could write this code exactly the same way in those languages.

True. You could write it in C or asm too, and it would be about as simple. But there's still a difference that if they weren't all primitive (and you can't always rely that they will be), you'll know it won't work straight away in Rust, whereas in the others you need to walk every data type involved to make sure ownership is clear (or rely on a garbage collector to save you).
Post reply on HN