My Journey to PostScript

In June 2023, I started to write an interpreter for PostScript, a rather surprising low level language. This blog tells the story of the adventure. The result is a web component in Javascript that can render a subset of PlostScript to PNG, SVG and PDF.
tiny-ps A web component to display PostScript graphics inside HTML
Examples and sandbox https://belle-nuit.com/site/files/minimal14.html
These examples use the old version of tiny-ps. They will be migrated soon
Gallery some graphic experimentations
Exercices programming exercises
Professor Brailsford demonstrates in this short video the basic concepts of Postscript as a programming language.
https://www.youtube.com/watch?v=S_NXz7I5dQc&t=779s
Donald E. Knuth on fonts
https://www.youtube.com/watch?v=_rRTZoGiFNU
Book project
- My own newspaper - How I got into typography
- Engineering - my girlfriend had an HP calculator
- Mac Laserwriter PageMaker - how I got into computers
- 4 3 add 2 mul - PostScript as a programming language
- Sidenote - a simple Javascript console
- Dictionary - defining new operators
- If then else - control structures
- (Strings) and arrays
- Sidenote - unit test
- We need to talk about garbage collection
- Preparing the white page
- 100 100 moveto 200 300 lineto stroke
- The scanfill algorithm
- Bezier curves
- Rethinking stroke
- Scale rotate translate - Transform the user space
- Implementing Transform
- Fixing scanFill overboarding
- Get locality with graphics and dictionary stack
- Working with fonts
- 100 100 moveto (Hello World) show
- Exploring our font library
- A bug in the stroke algorithm
- Get font outlines
- Align left, center, right and justify text
- A first attempt to wrap paragraphs
- Oversampling
- Render to HTML canvas and to PNG
- Render PostScript to SVG
- Render PostScript to PDF
- SVG as text experiments
- Parsing a TrueType font
- Perfecting TrueType parsing
- Composite glyphs
- Including TrueType to the codebase
- Text mode second try
- Text mode PDF
- Colors and transparency
- Transparency does not work with Stroke
- Textbook exercices
- Zero winding vs. even odd rule
- Implementing zero winding
- Clipping
- Curiosité 24 25
- Multiple pages
- Glyph oddities
- A web component called tiny-ps
- Offset Bezier curves
- Adding images
- Melting dots - Raster algorithm
- Back to paper with a plotter
- Back to analog linocut printing
Other links on PostScript history
PostScript® LANGUAGE REFERENCE third edition
https://www.adobe.com/jp/print/postscript/pdfs/PLRM.pdf
A good documentation on the operators can be found here
https://hepunx.rl.ac.uk/~adye/psdocs/ref/REF.html
PostScript and Interpress: a comparison (1985)
https://www.tech-insider.org/unix/research/1985/0301.html
A Device Independent Graphics hnaging Model for Use with Raster Devices (1982)
https://www.tech-insider.org/software/research/acrobat/8207.pdf
PostScript - a digital printing press (2022)
https://computerhistory.org/blog/postscript-a-digital-printing-press/
Notes on the history of PostScript (1998)
https://www.inkguides.com/notes-on-the-history-of-postscript/
INVENTING POSTSCRIPT, THE TECH THAT TOOK THE PAIN OUT OF PRINTING (1988)
https://spectrum.ieee.org/adobe-postscript
PostScript® 1.0 - A Code Study (2024)
https://ztoz.blog/posts/postscript-code/
John E. Warnock: Simple Ideas That Changed Printing and Publishing (2012)
https://gwern.net/doc/design/typography/2012-warnock.pdf