News for hackers. Stuff that matters.
Re:Yep, I created the new Avatar font by ricardobeat on Monday May 09, 2022 @02:15PM (#31317741)
Character alternates have been a feature in OpenType for a while. They can be triggered contextually or manually with CSS. Usually these and ligatures are enough to create natural-looking variations.
Re:Yep, I created the new Avatar font by gorkish on Monday May 09, 2022 @02:45PM (#31318137)
It's possible in PostScript to dynamically modify each glyph. Long long ago, I saw a small collection of typewriter and handwriting fonts that did this. This would have been back in the mid 90's or so.
Re:Yep, I created the new Avatar font by zimpenfish on Monday May 09, 2022 @03:57PM (#31318955)
I used a handwriting font with dynamic variations ~99-00 to generate address labels for someone entering competitions because printed labels were considered somewhat "cheating". Wasn't entirely convincing if you looked hard but miles better than 50 identical Times New Romans.
Re:Yep, I created the new Avatar font by NavinF on Monday May 09, 2022 @04:11PM (#31319116)
TIL postscript has an rng in the form of the rand function.

Assuming it’s widely implemented, it’d be hilarious to distribute files that replace their contents with a 4koma 1% of the time.

Re:Yep, I created the new Avatar font by capitainenemo on Monday May 09, 2022 @04:45PM (#31319479)
Is this related?

https://itnext.io/typescript-and-turing-completeness-ba8ded8...

I'd read this long ago, but my impression was that all the hinting stuff is auto stripped out of loaded web fonts for security/performance these days (maybe after some of those early font vulnerabilities that caused NoScript to block fonts), so most of us can't use it.

That's why I was wondering if ligatures might be a reasonable hack.

Re:Yep, I created the new Avatar font by gwern on Monday May 09, 2022 @05:33PM (#31320060)
You may not have an explicit rand(), but with the ligatures & substitution rules, you can add so much context sensitivity that no one will ever spot any duplications.

That's how you can do things like https://litherum.blogspot.com/2019/03/addition-font.html https://pagedout.institute/download/PagedOut_002_beta2.pdf#p... https://aftertheflood.com/journal/the-worlds-first-code-free... https://www.coderelay.io/fontemon.html (most of these will work in a browser). I've also suggested that you can create 'prank fonts' which add in subtle typos sporadically.

Less evilly, this is what calligraphy handwriting fonts do to get convincing variation.

Re:Yep, I created the new Avatar font by kixiQu on Monday May 09, 2022 @03:01PM (#31318308)
I think this is probably true to most people, and therefore good advice, but boy howdy do I still notice the repeats in e.g. "handwriting" fonts with extensive alternates -- the worse the quirkier the glyphs are supposed to be.
Re:Yep, I created the new Avatar font by angst_ridden on Monday May 09, 2022 @03:50PM (#31318879)
Back in the day, I created a font called "Scribble Flinger" that would put smudges and stains throughout if you enabled the contextual alternates. I came up with several alternates for each glyph, and was pretty pleased with the result.

It's a free font, and I occasionally see it used in posters for rock shows or other "alternate" events.

But your point is right on. I only created three alternates per glyph, if I remember correctly, so if you were to try to use it for an entire page of text, it would reveal its tricks pretty quickly. For just a title or header, I think it holds up.

Re:Yep, I created the new Avatar font by chipotle_coyote on Monday May 09, 2022 @07:40PM (#31321367)
They definitely work better for short text, primarily titles and logotypes. If you only have a few instances of, say, lowercase "a", then it's going to be fine if you only have a few alternate glyphs.

(Having said that, there's definitely a bit of craft, if not art, in choosing the right glyphs and getting the kerning right.)

Re:Yep, I created the new Avatar font by kalleboo on Tuesday May 10, 2022 @05:32AM (#31325124)
It especially stands out when you see repeated letters after each other in the same word, like "egg". Seems like a situation where font ligatures could be used to automatically fix it.
Re:Yep, I created the new Avatar font by Dangeranger on Monday May 09, 2022 @02:42PM (#31318102)
Do you know fonts that feature character alternates prominently? I cannot think of type that I've seen used which used variations on characters to lead to the appearance of natural looking hand written text.
Re:Yep, I created the new Avatar font by chipotle_coyote on Monday May 09, 2022 @07:44PM (#31321400)
The most (in)famous font that's chock-full of character alternates is Zapfino. Whether it'll look naturally hand-written is up for debate -- once you recognize Zapfino, you're going to recognize Zapfino -- but you can get some pretty expressive variants. The downside of recognizing Zapfino is always being permanently disappointed in how few people actually take advantage of those alternates, though.

You'll sometimes find them in other fonts, though; Hoefler Text's italics have a whole bunch of "swash" alternates, for instance, which can be a lot of fun for titles. (Both Zapfino and Hoefler Text are standard fonts on macOS.)

Re:Yep, I created the new Avatar font by ricardobeat on Tuesday May 10, 2022 @09:48AM (#31327074)
I found this one recently: https://ifonts.xyz/mythshire-font.html

Note how in the 'Dungeons & Dragons' example none of the repeated characters look alike. It only uses ligatures though, not contextual alternates, so words like 'egg' will still look mechanical.