make
./anonymous 'foo' > bar.pgm
Now open the output using your favourite
pgm viewer. If you don’t
have a pgm
viewer then we suggest the netpbm
toolkit to convert the image to a graphics
format that you can view. Most graphical web browsers can display PNG or JPEG
images.
./try.sh
NOTE: technically the text is supposed to be in all lower case but the script does use some upper case letters for demonstration purposes.
Did you know that in the first edition of The Hobbit Gollum was willing to give up the ring? It was not the Ruling Ring, the One Ring, the Ring of Power or anything like that: it was simply a literary device that could make one invisible. When Bilbo won the famous riddle game Gollum went to fetch the Ring - not to kill and eat Bilbo but to give it to him! But Bilbo had already found it just like in the later editions. Gollum profusely apologised and begged for forgiveness. Bilbo told him never mind because he would have had it anyway. But he’d let him off on one condition: that he show him the way out. It was at this point that Bilbo slipped the ring on and Gollum saw him vanish and understood that he already found it. But there was no call of thief and no hatred of Bilbo.
If you want to read the first edition they reprinted it some years back: The Hobbit Facsimile First Edition
. The details are also discussed in History of
Middle-earth [HoMe] VI, The Return of the
Shadow, part one of
the history of The Lord of the Rings of a twelve volume set - as well as in The
History of the
Hobbit.
p.s. Frodo lives!
BTW: if you haven’t read The Lord of the
Rings what are you waiting for? :-)
You’ll find out the source of the text above though you’ll see that there are
some circumflexes missing! That’s okay though due to I/O of the entry and in
earlier drafts sometimes the û had no diacritic but H after the u
in
it. The real text is:
Ash nazg durbatulûk, ash nazg gimbatul, ash nazg thrakatulûk, agh burzum-ishi krimpatul.
which when translated from Black Speech means:
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them.
This program takes a single command line argument, transcribes the argument text into Tolkien’s Elvish letters, and writes the transcription to standard output as a portable graymap (PGM) file.
The specific transcription mode is the Black Speech (Tengwar mode), as used in the inscription on the One Ring. The program handles the following digraphs:
gh
, sh
, th
: the corresponding
tengwar are output for these
specific sounds.mh
denotes the full tengwa
for [m]
; m
by itself means a horizontal bar above the next letter.rh
denotes the [r]
tengwa.uh
denotes the tehta for long
vowel [u:]
.zh
selects the up-reaching
tengwa for [z]
, while z
selects the down-reaching one.Punctuation marks other than commas and periods are ignored, as are whitespace characters. In addition, the argument text must be entirely in lower case.
The following command thus writes a rendering of the Ring
inscription to
the file ring.pgm
:
./anonymous "ash nazg durhbatuluhk, ash nazg gimbatul, \
ash nazg thrakatuluhk, agh burzhumh-ishi krimpatul." >ring.pgm
The source code assumes the ASCII character set; also, due to space constraints, the program uses rather inefficient algorithms, so it may waste a lot of time and space even when rendering moderately long strings.
The code contains a vector font which was derived by toying with Harri Perälä’s Tengwar Cursive font. Currently, only the glyphs used in the Ring inscription are included in the font.