You demo the result in GIMP (with a Wasm runtime linked(?)) and in the font viewer FontGoogles, and there's someone else who is playing around with it in gedit. There's no way to make use of this in, say, Firefox, yet, even though it ships with Harfbuzz, right?
I could not get it to work when I looked into it last, for Gimp I actually installed it globally, I think neither Chrome or Firefox uses the system Harfbuzz. Going by the dependants of Harfbuzz on Arch [0] it might be possible that it works in Chromium with a custom Harfbuzz, but it is not something I have tried. And since it is still experimental it is not built by default in any distribution I know of.
This is fantastic! These days, we have learned that no product can be taken seriously if it doesn't use LLMs somehow, so also based on Harfbuzz-Wasm, here's a font which is also an LLM: https://news.ycombinator.com/item?id=40766791
Related: One of the subniche in the Tetris communities is Tetris art / pattern creation, i.e. drawing predefined patterns while playing the game (almost) normally.
One of most practiced pattern is the chevron, where you draw a > shape with holes, but otherwise fill the whose board. This stemmed from the Japanese arcade version of Tetris by Sega (or Segatet for those in the known). This version was hugely popular in the arcade (it stayed for an incredibly 10 years in the top100 earner in some arcade magazine), and some player were destroying the game so much that they invented this challenge. This was recognized in Segatet successor Tetris the Grand Master (TGM3), and formally named "Secret Grade". One example here: https://www.youtube.com/watch?v=ZgzcAkjp0J8 , and another there with TGM3 signature speed https://www.youtube.com/watch?v=32wzKc0cHQU .
Secret grade is done within the confines of the game with no luck manipulation.
Note that the piece distribution algorithm is usually not a pure random() function, but one that's optimized to remove or reduce piece repetitions. For TGM it's history based (keep in memory the 4 last pieces type, reroll in case of repetition, with a 4 or 6 reroll limit depending on the game). IIRC Shuey uses a ruleset that uses the standard 7-bag algorithm (it's a Fisher-Yates with 7 elements; put all 7 types in a collection and deplete them one by one, randomly).
"Each letter and digit in this typeface is made up of exactly one of each of the Tetris pieces: (I), (J), (L), (O), (S), (T), and (Z). Furthermore, the letter is designed so that it can actually be constructed by stacking these pieces one at a time and be supported by previous pieces, as in Tetris. These designs were found by hand, aided by the BurrTools software which enabled searching for whether the Tetris pieces could fit inside a candidate outline for a letter. The piece colors roughly follow The Tetris Company's standard colors, or you can switch to black pieces. The initial rotations follow the standard Super Rotation System."
I find the back/forward buttons useful for undoing/redoing changes, so that I don't lose past cool designs / settings, though I can see it being a controversial approach.
That said, there were definitely way too much history generated when typing into a text field. I just implemented a planned compromise, where you only get a history event when changing a "committed" text field (meaning you previously defocused the field). Hopefully this is the best of both worlds!
And I clicked this submission because of his name, after all the time.
I didn't fully go through or understand the proof, but it was a refreshing addition to the classic problems I had to understand for college at the time.
Didn't need it, just fed my curiosity.
And when I clicked this link, my curiosity was fed again.
Seems like it's worth having heard of him, even as a non-scientist, because his subjects are just so interesting. Reminds me of Scott Aaronson in that regard.
That paper does not prove that Sokoban is NP-hard. It does, however, cite an earlier paper proving the stronger result that Sokoban is PSPACE-complete:
From a programming perspective, it would have been cooler if the font generation was automatic at the cost of a bit of quality. This might have allowed for more interesting variation, lowercase, and support of other symbols.
There is nothing less anoying than seeing a really custom font repeat a letter.
It has a pretty much complete ascii font but I am cheating in that I allow one
non tetris piece with only 3 pixels arranged as an angle.
There is also a simple tool that tries to find a covering of a given font.
Reminds me of this sample from the Lwan project: https://time.lwan.ws/blocks -- where the clock is rendered on the server, and new frames are sent to the client using chunked encoding.
Good idea! I've gone ahead and implemented this feature: if "obscure in URL" is turned on, the text won't be visible unless you focus on the textbox (e.g. to edit it).
I don't understand the limitation to use all of the pieces exactly once, I'd say the rule to keep valid Tetris moves only is enough. I'm curious what could be built with just that in place.
Right now I especially dislike letters: 'B', 'G', 'I', 'N'. For comparison, I like 'F' and '1', they both look very natural to me; 'A' and 'S' get a pass too. 'Q' gets a special mention for its long tail.
That being said, the project is super cool and looks great already.
Feels like there should be many ways to make a particular letter, and it'd be neat if it was random each time. I tried "Hello" and noticed the L's are the same. Considering it's just for fun I think it'd add a little more fun if it was actually unique letters.
Also, can we get a checkbox for "pause after animation"? I want to take a minute to check out the letters before it starts animating again. I know you can click off Animate after it finishes, but if I share this, others may not be so keen.
Regarding the first question, I've gone ahead and implemented random build orders, so at least the two Ls in HELLO will usually produce different animations (depending on random choices). Designing completely different glyphs for the same letter is quite challenging (finding these already took a lot of work).
Regarding the second question, there's already a 2-second delay. I wonder if there should be a slider to specify the delay?
I couldn't reproduce this bug. Perhaps the program you're using to display the GIF doesn't support the GIF frame delay feature? (E.g., Chrome seems to display them fine.) Feel free to open an issue on the repo if I'm missing something: https://github.com/edemaine/font-tetris
Thanks for the feature suggestion! I've gone ahead and implemented random valid stacking order. So if you reload the page, and enter text that repeats the same letter more than once, you will hopefully get different build orders (depending on random choices). For example: https://erikdemaine.org/fonts/tetris/?text=aaaaa&rotate=0&sp...
I did it with the Harfbuzz shaper which now have experimental support for embedding WebAssembly programs to shape fonts.
Talk where I show it off: https://www.youtube.com/watch?v=Ms1Drb9Vw9M
Source code: https://github.com/Erk-/programmable-fonts
You can also see actual uses of this WebAssembly embedding to show that is not just for fun here: https://github.com/harfbuzz/harfbuzz-wasm-examples