p e r s o n a l |
"April" 2024
(30 Apr at 23:59) |
Oops! Usually when I fail to post on time and then illegally backdate the post, yielding a penalty of -1,000 points, it's shortly after midnight. Like, as I'm trying to fall asleep (which of course involves and involuntary inventory of everything I may have failed to do), I'm struck with a panic and then get back out of bed to write some dumb pro-forma apology post. This time I just went to bed and actually fell asleep and now here I am noticing that it is May 1. Still, the whole point of doing this every month is to make the grid of months line up nicely, so the post is backdated by 9 hours and nets -1,000 points.
Speaking of lining up nicely: I did get my SIGBOVIK papers in on time and gave a lightning talk at the conference. SIGBOVIK was very popular this year, with our longest-ever proceedings (see SIGBOVIK 2024 PDF or bound volume). This year my project is a paper about a new typesetting system that I wrote to produce the paper (and the talk's slides). That system is called BoVeX and the paper is called Badness 0, which you can read as Badness 0 (Knuth's version) and/or Badness 0 (Epsom's version). You can also maybe find a recorded livestream of the breakneck 5 min presentation, but I would wait for the proper video (in progress now!), which is the same content with much better pacing and details.
Speaking of details: I also presented at An Evening of Unnecessary Detail, which is one of Matt Parker ("Standup Maths")'s live shows. Other than the part where I tried to pack a dense months-long technical project about details into 12 minutes, this was a blast! Lots of cool, interesting people. This took place in a proper comedy club in Brooklyn, like with posters of people that I watch on TV (e.g. Taskmaster legend Fern Brady is performing there in a few weeks, so it seems I'm a mere 5 or 6 steps away from my dream of being a contestant on Taskmaster now), and was sold out (due exclusively to the eminence of others, since it was sold out before I even joined the bill). I finally hung out with Grant Sanderson ("3blue1brown") and told him about math. The audience was amazingly attentive and wholesome, and quite a few of them recognized me and wanted to talk after the show, which is fun. (I do not envy the queue that Matt and Grant endured, though!) Enjoy my technically deficient vacation photography:
I'm photobombing, but Matt is so used to this act that he is reflexively crouching down so as not to appear twice my height
Speaking of technically deficient photography: An additional reason why my video is not done yet (or indeed, why it currently has status Filming 0) is that I finally pulled the shutter release on a new video camera. After much deliberation (and visiting the B&H showroom while in NY, etc.), including on far more ridiculous options, I settled on the Canon R5C. After a complex week-long courtship ritual with the FedEx guy, that finally arrived last night, at which point I immediately realized that I need further accessories. But I'm excited to shoot on this thing and to make my computer suffer with 8k video. It seems to have gotten too complacent with "Full HD."
Finally, I think the main reason I failed to post on time last night was that I was up late playing Balatro. This game is all over the place so you probably don't need me to tell you about it, but it is indeed a good (and addictive) deck-building game that I am enjoying instead of sleep. I am not interested in 100%ing this one, but there are still lots of appealing challenges left for me to do. I'd recommend it if you have the self control to avoid firing it up "for a quick game" when you should be working on your projects or sleeping. |
|
|
Looking forward to the video! Typography, compilers, maybe even a little bit of chess sneaking in, all sprinkled with your dry humor and beautiful hand-drawn artwork. What can be better? I hope the video gets at least as long as last year's one. |
Is there any recording of your An Evening Of Unnecessary Detail talk perchance? |
I thought you would have learned my name by now, Gboard! DX |
I'm not sure why, but Firefox on macOS absolutely chokes on the Badness 0 PDFs (both versions); the kerning is all over the place. |
noone can be a better speaker/candidate/chief guest of a "comedy" show titled "An Evening of Unnecessary Detail" orz
big fan of all three in ascending order of respect++ from left to right in the image |
What is this? A crossover episode?
It's great seeing y'all get together! Thanks for sharing! |
Yeah, at first I thought the aggressively bad kerning was part of the joke, but the example monospaced paragraphs are *really* messed up in both Firefox and also in whatever my default PDF viewer is in Debian.
I took a look at the SIGBOVIK PDF and it looks *way* better. (Page 131 intra-diegetic/135 extra-diegetic for others who want to read it there.) |
I generated the PDFs myself so there's possible I made a mistake, or possible that Firefox just doesn't support something I'm doing. :( I should try to fix this since I actually may use BoVeX for future papers. If anybody has any ideas (even like, an error message) I'm definitely interested!
Concentrating on the video for now though! |
And recordings: Supposedly someone did record the event, but I don't have the video (yet). The director's cut for this project will be the YouTube video, although I'm not opposed to completionists watching the live recording! |
Firefox uses pdf.js to render PDFs under the hood, I checked its latest version but didn't see any warnings/errors despite the garbled kerning. I spent about half an hour trying to figure out what's going on but unfortunately found nothing. I suggest you generate a test PDF and create an issue at https://github.com/mozilla/pdf.js There's plenty of people who actually understand how PDF rendering works (unlike me). |
So you are telling me I read through that whole paper with kerning from hell and it was just a display bug??? |
Great paper(s) as always! No apparent kerning issue on chrome or android. |
I can confirm that the version of the paper(s) attached to this post have kerning problems on both android and desktop firefox. Okular shows problems with kerning as well, however the wrong kerning looks different from firefox. Librera FD on android renders correctly. The version in SIGBOVIK proceedings looks fine in every program though. Shurely the "Portable Document Format" can't experience non-portable behavior, right? Right? |
Right? I don't get it! I wish there was at least some kind of validator that would tell me "this is broken" instead of just looking wrong on some platforms. :( |
I would pay for an online version of the monofixed version of the algorithm! |
OK, so I've spent a bit more time investigating the rendering issues some of the folks are having.
Turns out, there's actually plenty of PDF validators out there. I used one from pdf-online.com whose output looked reasonably constructive. Basically, I was immediately yelled at for a bunch of missing keys, one of which was Widths.
I checked https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf (page 255), and apparently it is really required. I couldn't find what a reader is supposed to do in case of its absence, so I guess it's implementation specific.
Then I went to see what pdf.js (which is what Firefox uses under the hood) does, and to my surprise instead of reading the actual glyph widths from the font data, it relies on BaseFont metrics: https://github.com/mozilla/pdf.js/blob/master/src/core/evaluator.js#L3986
If the referenced BaseFont is not a real thing, it falls back to Times Roman for serif typefaces and Helvetica sanswise: https://github.com/mozilla/pdf.js/blob/master/src/core/evaluator.js#L4046
A fun side note: because Font18 and its brothers (which is what Palatino goes by after https://sourceforge.net/p/tom7misc/svn/HEAD/tree/trunk/cc-lib/pdf.cc#l3808) are not known serif typefaces, nor do they contain the word "serif" in their name, pdf.js treats them on par with Helvetica.
I also was curious why reprocessing your paper seemingly fixes all issues so I compared the original with what macOS Preview exports it as, and it seems like it completely revamps the whole thing and even embeds the kerning values.
Speaking of kerning, it's apparently not very portable to rely on a PDF reader in hope it'd apply it. TIL: it may not and in some cases it absolutely doesn't. I didn't read too much of your code (trying not to spoil the fun), but if you in any way rely on kerning to position the word pieces, I suggest you use the TJ operator instead of Tj.
I hope all these discoveries don't distract you from making the video to which I'm really looking forward! |
Awesome, thank you!
I think the Widths table is a likely explanation. That would be redundant with the information already in the embedded font, so it would make sense that some readers would care and others would just use the font metrics. I have the widths from the TTF so it should be pretty easy to add that.
I am working on the video this weekend, so I will try not to let this distract me :) |
I added the Widths table, but it turns out there was another issue (which I could only find by stepping through pdf.js in the debugger!): Firefox really wants the "argument" to /FontName to begin with a slash. I guess that makes sense, but none of the validators I found reported any issue here!
FWIW I think the text rendering looks much better in Chrome, but I am happy to have it working in Firefox. Thank you everyone (especially mixmix) for the help and encouragement.
The PDFs on the site should work now. They still don't open in Illustrator; that would be nice to fix but I don't think it'd be a serious obstacle for the main use of the papers, which is to print them out and shred them.
I'll try to make the source code a bit easier to use when I find some more energy. |
Since you like to meddle with the GPL justification, you may be surprised that there are many versions of the GPL 2.0, https://github.com/pombredanne/gpl-history/tree/master/allvers |
|
|