From b21d92b29b223bfe1d47bd0619daa3d21fae3ce2 Mon Sep 17 00:00:00 2001 From: Florian Moser <git@famoser.ch> Date: Wed, 28 Apr 2021 23:07:34 +0200 Subject: [PATCH] Restructure --- pdf/pdf.html | 101 ++++++++++++++++++++- project management/project management.html | 2 +- 2 files changed, 101 insertions(+), 2 deletions(-) diff --git a/pdf/pdf.html b/pdf/pdf.html index a26e485..a0a2628 100644 --- a/pdf/pdf.html +++ b/pdf/pdf.html @@ -56,6 +56,8 @@ Acrobat Distiller (network version): 2495$ --- +# Releases + | | Year | Industry | Notable features | | ---- | :--- | :------- | :--------------- | | v1.0 | 1993 | Adobe | **text**, **images**, **pages**, **hyperlinks**, bookmarks | @@ -112,7 +114,7 @@ Single purpose, which is archived: <img src="images/sizing.png" width="60%"> -Comarison: How webpages deal with different devices: +Comparison: How webpages deal with different devices: - Adapt font size, colors, spacing, ... to screen size - Adapt layout to aspect ratio / screen size - Remove or add elements depending on end device @@ -314,6 +316,14 @@ Steps: => Requires deep knowledge about font +--- + +# The PDF wayâ„¢: Roll your own + + + + + --- class: center, middle @@ -322,8 +332,97 @@ class: center, middle --- +# Introduction + +History: +- Adobe `Type-1` (1984) +- Apple `TrueType` (1991) +- Microsoft & Adobe `OpenType` (1996) + +`OpenType` flavours: +- `TrueType`-flavoured `OpenType` (`.ttf`) +- `PostScript`-flavoured `OpenType` (`.otf`) + +Omnipresent. + +--- + +# Table directory + +File starts like this: +``` +0x00010000 || 12 || (...) || tables +``` + +`0x00010000` for TTF (or `0x4F54544F` for OTF) +`12` is number of tables +tables specify content + +Many tables, many functions. + +Have you tried typesetting Ù…Ø±ØØ¨Ø§ بالعالم? +What about suficient? + +--- + +| Name | Purpose | +| ---- | :--- | +| cmap | character maps | +| maxp | memory requirements (#characters, #points, ...) +| head | global information (max bounding box, font style, ...) +| OS/2 | windows font metrics +| name | multilingual strings about font (copyright notice, font name, ...) +| cvt | list of values for instructions +| fpgm | program run upon first usage of font +| gasp | "prefered rasterization on gray-capable devices" +| prep | program run upon character drawing +| GDEF | ligatures +| GPOS | "glyph placement in sophisticated text layout" +| GSUB | ligatures +| hhea | sizing per glyph (ascender, decender, ...) +| loca | offsets of glyph data blocks +| hmtx | width of glyphs +| glyf | list of glyph data blocks + +In short: Read out tables, patch them together differently, hope offsets work. + +--- + +# Bonus: How to extend ttf? + +Steps: + +1. Just do it +2. Wait until other vendors need to adapt +3. Profit + +like colored glyphs (emojis!): +- `COLR`, `CPAL` (microsoft + mozilla) +- `CBDT`, `CBLC` (google) +- `sbix` (apple) + +--- + +class: center, middle + +# Reflection + +--- + +# Reflection + +Success factors: +- PDF specification was adapted to customer requests +- TTF can be extended by anyone without breaking readers +What about long term storage (PDF)? +- PDF specification is complex, large, organically grown +- PDF destroys semantic meaning of source +- Might not even able to recover text! +Better Long-Term storage? +- Word / Excel -> nearly same problems as PDF +- HTML / CSS as structure stays -> but the "web" changes rapidly </textarea> diff --git a/project management/project management.html b/project management/project management.html index 9cd0c95..bbdceca 100644 --- a/project management/project management.html +++ b/project management/project management.html @@ -52,7 +52,7 @@ Nearly universally referenced issues: --- -# Epirical data +# Empirical data Unfortunately, mostly useless. -- GitLab