Stories
Slash Boxes
Comments

SoylentNews is people

posted by chromas on Thursday March 14 2019, @04:44AM   Printer-friendly
from the the-whole-is-greater-than-the-sum-of-the-parts dept.

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.


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1)
  • (Score: 1, Insightful) by Anonymous Coward on Thursday March 14 2019, @06:18AM

    by Anonymous Coward on Thursday March 14 2019, @06:18AM (#814081)

    I can see only trouble.

  • (Score: 0) by Anonymous Coward on Thursday March 14 2019, @08:13AM (2 children)

    by Anonymous Coward on Thursday March 14 2019, @08:13AM (#814112)

    you know when people say "this is why we can't have nice things"?
    this is the sort of nice thing that they are talking about...

    by the way, LaTeX is also Turing complete, and this means that you can also do fun things with it:
    https://tex.stackexchange.com/questions/29402/how-do-i-make-my-document-look-like-it-was-written-by-a-cthulhu-worshipping-madm [stackexchange.com]

    • (Score: 0) by Anonymous Coward on Thursday March 14 2019, @02:15PM

      by Anonymous Coward on Thursday March 14 2019, @02:15PM (#814206)

      Dang, those are some impressive modifications!

    • (Score: 2) by darkfeline on Thursday March 14 2019, @07:35PM

      by darkfeline (1030) on Thursday March 14 2019, @07:35PM (#814396) Homepage

      Uh, yeah? LaTeX is a programming language for typesetting, of course it's Turing complete. Or rather, LaTeX is just a macro package written on top of TeX which is Turing complete. Of course a macro package written on top of a Turing complete language is Turing complete.

      --
      Join the SDF Public Access UNIX System today!
  • (Score: 2) by SemperOSS on Thursday March 14 2019, @09:04AM (1 child)

    by SemperOSS (5072) on Thursday March 14 2019, @09:04AM (#814118)

    I have always wanted a font that would automatically apply appropriate swirls and curlicues to the letters like this [pinimg.com] or that [ssl-images-amazon.com]. I know that many fonts exist that have extra glyphs with swirls and/or curlicues but I have to find these glyphs and apply them. What I dream of is a font that does it itself by looking at the context of letters. Such a font would compensate for my sincere lack of artistic abilities, meaning I could just write "Medusa" and out would come something like the first example.

    BTW: I just realised that if you look closely at the letter M in the first example, you can see the letter is in two completely separate parts, the first looking slightly like a capital A and the other like a capital C.


    --
    I don't need a signature to draw attention to myself.
    Maybe I should add a sarcasm warning now and again?
    • (Score: 4, Touché) by krishnoid on Thursday March 14 2019, @09:08AM

      by krishnoid (1156) on Thursday March 14 2019, @09:08AM (#814119)

      You're thinking too small. If I typed 'Medusa', I'd want an assortment of snakes coming out of it.

  • (Score: 3, Informative) by KritonK on Thursday March 14 2019, @11:32AM (2 children)

    by KritonK (465) on Thursday March 14 2019, @11:32AM (#814135)

    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)

      by Anonymous Coward on Thursday March 14 2019, @12:29PM (#814153)

      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

        by Anonymous Coward on Thursday March 14 2019, @09:01PM (#814462)

        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.

  • (Score: 2) by DrkShadow on Thursday March 14 2019, @11:47AM (1 child)

    by DrkShadow (1404) on Thursday March 14 2019, @11:47AM (#814137)

    Xerox was altering input numbers _years_ ago!

    http://www.dkriesel.com/en/blog/2013/0802_xerox-workcentres_are_switching_written_numbers_when_scanning [dkriesel.com]

    When you'd scan the document, Xerox would run OCR across the document (for storage efficiency?), and you'd get incorrect numbers. This would happen with an operation as simple as copying.

    • (Score: 2) by maxwell demon on Thursday March 14 2019, @12:30PM

      by maxwell demon (1608) on Thursday March 14 2019, @12:30PM (#814156) Journal

      But was the Xerox copying process Turing complete?

      --
      The Tao of math: The numbers you can count are not the real numbers.
  • (Score: 2) by DannyB on Thursday March 14 2019, @01:37PM

    by DannyB (5839) Subscriber Badge on Thursday March 14 2019, @01:37PM (#814177) Journal

    Microsoft might see it as a vector to force Windows 10 upgrades.

    --
    When trying to solve a problem don't ask who suffers from the problem, ask who profits from the problem.
  • (Score: 0) by Anonymous Coward on Thursday March 14 2019, @08:05PM

    by Anonymous Coward on Thursday March 14 2019, @08:05PM (#814416)

    Oh wait... thanks micro$oft.

(1)