“When my daughter started Krav Maga I explained the three rules:
1) Never hit first.
2) Always hit back.
3) If you knock them out you get ice cream.”

— William O. B'Livion, on childrearing

Front toward enemy…


(via)

Bodacious Ryo-tas


Shattering the Rushuna barrier, it’s Ryoka Narusawa aka Ryotas, from Occultic;Nine. For the most part, fan artists are not exaggerating her bustline. Her huge tracts of land have huge tracts of land.

“She carried a pair of 44s. She also had a gun.”

more...

Fun with PDFs…


While waiting on a fix for my Perl PDF font woes, I started thinking about some of the other long-standing issues I’ve had with PDF::API2. I actually use PDF::API2::Lite most of the time, with a few extra functions (like clip) merged back in, because I don’t need color spaces, bar codes, metadata, outlines, etc, etc. I just need all of the drawing functions and decent font handling, including proper subsetting in the output file.

Which it doesn’t do. Pro tip: the easiest way to clean up a PDF file full of cruft like giant embedded fonts is to run it through the ps2pdf utility supplied with Ghostscript. Despite the name, it works just fine as a pdf-to-pdf converter and optimizer.

Bottom line, PDF::API2 has been getting staler every year, and the font thing encouraged me to look elsewhere. Phil Perry is taking a stab at it with his fork PDF::Builder, but he’s still feeling his way around, and it’s a big job.

But I’ve written a lot of code over the years, and the PDF APIs I’ve looked at in other languages are either convoluted, limited in function (report writers and form fillers, mostly), just plain missing, and in at least one case commercial, and that generally applies to the other modules I rely on, too, like the Swiss Army Knife of date handling, DateTime.

By happy accident, I discovered that the Cairo library will generate PDF files, and integrates nicely with FreeType for robust font support, and they both have decent Perl modules. Being C libraries, they also have some performance advantages, but the most important thing they have is support.

Documentation and examples are pretty limited for the Perl modules, but I just finished successfully converting my calendar generator to use them, and it was only moderately annoying. The two biggest issues were that Cairo thinks (0,0) is the upper left corner, and that it only tracks one color in its graphics state, compared to PDF’s separate stroke and fill colors. Shimming around these problems added about 55 lines of code. Text positioning is improved thanks to Font::FreeType (and can be improved a lot more by exploiting the API fully), and output with embedded fonts is significantly smaller. Also, all my fonts work.

Now that I have a working example, I’ve started work on a wrapper module that works like PDF::API2::Lite, so that I can convert my old scripts by just editing a few lines at the top. Shouldn’t be too much work, and I’m tentatively calling it PDF::Cairo.

There’s also a Pango module for advanced text layout, but integrating that is definitely a “phase 2” item.

Update

As far as I can tell, Pango offers the exact opposite of what I want, turning font lookup into a game where the penalty for guessing wrong is having all your text rendered in Verdana.

(D)i(ane)Phone


Someone who actually needs an iPhone XS Max Plus Supreme…

(via)

Pixiv artist ‘tomo’


How is it that I’m the only person following this artist? Seriously, the Grea pics alone ought to be worth a few hundred.

Update

…never mind, Pixiv doesn’t display how many people follow another user, it’s how many users they follow. So, tomo only follows userid #11, aka Pixiv itself. I could have sworn there was a way to display follower count, but the API call that’s supposed to return that in pixivpi3 just returns your own followers. Maybe they locked it down.

more...

Weather Duck


If the duckie’s rockin’, it’s probably an earthquake.

(via)

“Kenneth, what is the frequency?!”


I think this is the opposite of using a tinfoil hat to block the mind-control signals…

Surprisingly, the “Kenneth” attack may not have been an example of Dan Rather’s hobby of making up phony news stories; someone who later murdered an NBC employee claimed responsibility.

Identifying as a liberal arts major…


“They told us we’d never use math after graduation, so I didn’t learn any.”

(via)

In reality, not many stories have 25 fully-fleshed-out characters in the first place, but in the ones that do, they’re generally too busy being part of the story to wave their diversity checkboxes in your face.

Unless the writer sucks, of course.

Update

In fairness, this is a teenager, so he still has a chance to avoid a future in Tumblr’s SJW Vortex.

“Need a clue, take a clue,
 got a clue, leave a clue”