What if someone discovered that the specifications in a font file could be Turing complete? What if that person realized that a font could, therefore, perform computations. How about addition?
Proving the Turing Completeness of Fonts:
The goal is:
I wanted to try to implement addition. The input glyph stream would be of the form "=1234+5678=" and the shaping process would turn that string into "6912".
The sheer number of details precludes a simple summary. Mix a little recursion with a strong helping of remapping to implement some grammar productions and voila! The font file is available on Google drive.
What "creative" [mis]applications of this technology can you think of? Define a font file that has a 1:1 mapping of all ASCII characters... except replace all instances of "123" with "456". How could you recognize this had happened to you?
Consider: embedding it in a web page or a PDF document. Making it a new (default) printer font.
(Score: 3, Informative) by KritonK on Thursday March 14 2019, @11:32AM (2 children)
I installed the font, fired up LibreOffice, typed =1234+5678= and changed its font to AdditionFont. All I got was =1234+5678= displayed in a dot-matrixey font, not 6912.
(Score: 2, Informative) by Anonymous Coward on Thursday March 14 2019, @12:29PM (1 child)
You need a hacked harfbuzz and to be using an app using it.
(Score: 1, Interesting) by Anonymous Coward on Thursday March 14 2019, @09:01PM
So ... then the font isn't turing complete per se. The font is only a syntax for a turing complete language that can be used in specific applications. Seams pretty boring to me.