News for hackers. Stuff that matters.
Re:Sysadmin war story: the network ate my font by MBCook on Friday September 15, 2017 @05:24PM (#15260894)
Maybe because PDF has been around a long time and it used to be that embedding even a basic font would have been a MASSIVE increase in file size?
Re:Sysadmin war story: the network ate my font by tedunangst on Friday September 15, 2017 @11:41PM (#15262714)
While we're on the subject, PDF software typically supports embedding just a subset of the font, containing only the characters used in the document, to save space.
Re:Sysadmin war story: the network ate my font by MBCook on Saturday September 16, 2017 @09:55AM (#15264654)
Really? Neat.
Re:Sysadmin war story: the network ate my font by KekDemaga on Friday September 15, 2017 @06:44PM (#15261456)
Why don't PDFs just render the text and store it as some form of vector image file.
Re:Sysadmin war story: the network ate my font by wpietri on Saturday September 16, 2017 @08:42AM (#15264393)
PDFs come from PostScript. PostScript was invented in 1984. The Apple LaserWriter, introduced in 1985, was the biggest selling early PostScript printer. It had a 12 MHz processor, 1.5 MB of memory, and communicated at 0.225 Mbps.

To make this work effectively, printers would cache fonts. That saved on overall file size, which was important for storage and transmission. But the real driver was rendering speed. Most documents are pages of text at a small number of sizes and there are a small number of letters.

If you're going to print 300 lower-case "e" characters, all in 10.5 point Times New Roman, it would have been ridiculous to do the hard work of rendering the bitmap from vector each time. You render it once, cache the bitmap, and then just plop the bitmap in the right spot.

I know this because circa 1993 one client had me build a custom font that varied letterforms slightly to mimic a hand-lettered effect. They ran these weekly newspaper ads for their big wine store, and the were paying a guy to hand-draw the whole thing. They wanted to keep the casual look, but save on the cost. (And I presume the guy was kinda tired of writing the same things over and over, but I never met him.)

I learned enough PostScript to make it happen, decomposed each letter into strokes, and then drew the strokes with slightly different alignment each time. It worked fine in simple tests, but the first time I rendered a page, I thought I had broke the printer. Instead of the printer's top speed of 8 pages/sec, a full page took over 15 minutes.

So as usual with "why don't they just" questions, the answer is, "because 'just' is sweeping some things under the rug". It was harder than it looked at first glance.

Re:Sysadmin war story: the network ate my font by MBCook on Friday September 15, 2017 @07:38PM (#15261737)
Fonts can have different glyphs/hinting at different sizes and you don't know how big a PDF will be rendered.
Re:Sysadmin war story: the network ate my font by cbhl on Friday September 15, 2017 @06:58PM (#15261543)
That also takes more space. Understandably, when memory was counted in kilobytes and disks were counted in kilobytes, file formats were designed differently than they are today.
Re:Sysadmin war story: the network ate my font by captainmuon on Saturday September 16, 2017 @04:04AM (#15263518)
Usually you store the text anyway, so you can select and search it, or have it read by accessibility tools.

And most of the time, the letter spacing is the default given by the font, so you just have to encode the position of the beginning of a run of text. So it is pretty space efficient, too.

Re:Sysadmin war story: the network ate my font by kps on Friday September 15, 2017 @07:46PM (#15261782)
A font is some sort of vector image file.
Re:Sysadmin war story: the network ate my font by yellowapple on Saturday September 16, 2017 @05:15PM (#15266802)
Not always. Bitmap fonts are a thing.