Development
If you want to know more about the development of Typo_graphics, this section is for you.
Inspiration
This project began when I purchased a Silver Reed SR100 Tabulator typewriter, second hand, for just £1.25. I had never owned a typewriter before, and I picked it up out of some latent interest in the mechanics, and of typography.
This typewriter model doesn’t have a 1
key, the l
is used in substitute. Similarly, there is no key for !
.
Some of the characters that are missing can be made by overtyping, typing a character,
moving the carriage back, and typing another.
To type a !
, one must first type '
, backspace, and overtype .
.
This got me interested in what other combinations exist.
I tried to type out a few such combinations, but with 82 glyphs on the typewriter, attempting to type all would a large task.
Of those I had typed, I found :
and -
would form a ÷
, but in general it was hard to spot anything of much use.
Trying to find reference material online for what combinations would form what characters, I found little of relevance. What I did find, was instructions to produce a soldier from O, X, &, /, W, and _ using variable line spacing. A quick and easy way to make something unusual from a typewriter.
Further looking into producing this type of images, I came across the book Artyping [Nelson1939]. In this book Nelson explores ways to create patterns from characters, for bordering letters, and later showcases some typewritten images. Soldiers, similar to those above, also feature.
In looking for how to reproduce these more complex images, I found Bob Neill’s Book of Typewriter Art [Neill1982], which contains page after page of instructions.
However, a problem arose; all of the instructions heavily use the @
key, one which my SR100 lacks.
The author suggests that letters may be substituted, but this is not ideal, and the subject matter is often very dated.
At this time I decided I would build my own program to produce such instructions for my own machine, for which I had already devised some of the internal logic.
Existing work
The process of making images from characters is well established in ASCII art.
In looking for simple ASCII art generators, I found many to be very underwhelming.
Many of these would depend on a predetermined scale of brightness, such as ['.', ',', '+', 'X']
.
Not only did this make the code nontransferable to machines without such characters, but I felt it underutilised the characters.
If two characters have the same average brightness, perhaps "
and /
, the above would make no distinction between them,
however they would produce drastically different results.
More advances ASCII art generators do appreciate the character forms, but are still lacking. ASCII art is limited to single characters per space; no overtyping of characters can be done, unlike on the typewriter, where the user is free to return the carriage without feeding the paper.
It was clear that using such generators was not an acceptable solution, and that something custom would have to be made.
What makes Typo_graphics different?
The core tenets that underpin Typo_graphics:
- Remain font independent
- Utilise the characters to their full extent
- Use the typewriters ability to overtype characters, where useful to the image.
Typo_graphics aims to be usable on a wide range of typewriters as possible. This flexibility would also allow use with block printing, or monospace fonts, though in the latter case overtyping need be disabled.
The main output for Typo_graphics is the instruction set generated.
image_to_text()
also produces an output image, which is mainly intended as reference while typing, to place oneself.
The output, however, is perfectly usable, without the need to type the instructions out.
The instruction format
The instruction format is heavily borrowed from [Neill1982].
Lines of the image are denoted by an integer, starting from 0. Within each line, characters are grouped together, and a number prepended to each to indicate how many times that characters should be typed in succession.
Here is an extract from the instructions for the single depth Australian shepherd:
00 | 7E 1$ 13E 1$ 1E 1H 16E 1$ 19E
01 | 7E 1$ 13E 1$ 1E 1S 36E
02 | 7E 1$ 9E 1T 1S 1Z 1H 1$ 2E 1Q 35E
03 | 7E 1$ 8E 1P 4Z 1H 17E 3T 1S 1H 16E
04 | 4E 2$ 1E 2$ 4E 1F 3E 3Z 1E 2Z 1" 2T 4M 4" 9Z 1H 16E
05 | 3E 1$ 3E 2$ 1E 1" 1G 1. 1- 1. 1Z 1Q 1half 1Q 1E 5Z 3G 1. 2Z 5. 1G 7Z 1T 15E
06 | 6E 2Z 1G 2Z 1_ 2Z 1Q 1E 1$ 1E 1$ 1H 3E 2Z 2G 1Z 3Q 2Z 15 3. 6Z 2Q 2Z 1H 12E
07 | 4E 4Z 2Q 1E 1S 1Z 4E 1$ 1E 1S 1Z 2E 1G 3Z 1H 1E 1$ 3E 2Z 2. 1G 2Z 1S 1Q 1E 1M 1E 1$ 1E 2Z 11E
08 | 2E 3Q 1Z 1P 1T 1Z 2E 1G 1B 1Z 1Q 1H 1E 1$ 1Z 1G 1" 1H 1P 2G 1Z 1Q 1half 2$ 1E 1Q 5Z 2. 1G 1Z 1T 1S 1F 1T 1F 1M 1S 2Z 1H 1$ 8E
09 | 1$ 2E 1T 1H 1E 1Z 1Q 1p 3Z 1Q 2E 1half 2E 1P 2. 1G 2. 2Q 1half 1" 1N 1C 2$ 2E 2Z 1Q 1Z 1G 3. 1_ 1p 1E 2Z 1_ 3Z 1T 1H 7E
If overtyping is used by the image, and therefore a single image line requires two or more typing passes, line numbers have letter(s) appended. An example of this can be seen in the instructions for the Australian shepherd.
00a| 23H 1G 1T 16H 1M 5H 1T 12H
00b| 21l 1j 1l 2Z 15l 1j 1_ 5l 1Z 12l
01a| 23H 1G 1T 18H 1T 16H
01b| 7l 1j 13l 1j 1l 2Z 18l 1Z 16l
02a| 16H 12 1I 1" 1sp 2H 1M 1S 17H 2M 1F 2H 1G 1T 12H
02b| 7l 1j 8l 1_ 1T 2Z 1I 1j 2_ 16l 1j 3_ 2l 2Z 12l
03a| 16H 1" 4Z 1" 1H 1M 13H 1T 5" 1T 16H
03b| 5l 1j 2l 1j 7l 1_ 4sp 1B 1l 1_ 13l 4Z 1G 2Z 16l
04a| 13H 1" 1? 1T 1" 2sp 1P 12 2Z 11" 10Z 16H
04b| 3l 1j 3l 3j 2l 13 1P 1H 4Z 2_ 3sp 7T 12sp 1T 16l
In contrast to the Neill format, Typo_graphics does not expect the character grid to be square. Instead, images are expected to be typed using single line spacing, such that the top of one row of glyphs sits touching the bottom of the previous row.
In practice, the code works equally well for greater line spacing, by including said space into the Glyph
images, though the result will likely have a banded look.
Using a glyph size smaller than the line spacing would also work, though characters that extend past their bounds may interfere with the image.
[Nelson1939] | Artyping, Julius Nelson, 1939 (viewable https://archive.org/details/Artyping ) |
[Neill1982] | (1, 2) Bob Neill’s Book of Typewriter Art (with special computer program), Bob Neill, 1982 (viewable https://loriemersondotnet.files.wordpress.com/2013/01/typewriterart.pdf ) |