From xradiograph

Processing: Text and Type

Text processing/display in Processing

Notes on text display and fonts is not in-appropriate


Cannot apply stroke to text, only fill.
Paint it twice -- with an offset
Might be easier with a pushMatrix, translate, popMatrix to paint from a center location (if centering).
Processing 2, Creative Programming Cookbook Chapter 2 - Drawing Text, Curves and Shapes in 2D



Random notes/observations

Text is far slower than graphics.
Outlines not possible.
Look at the source-code of processing.js for computeFontMetrics() and PFont


Rendering large amounts of text FAST

Suggests rendering text to images, and THEN moving the associated images around. A-ha!

This would not work for dynamic text, however, I think. Unless we go so far as to have images of each letter, and then... kerning &c &c &c.



Rita - I tried this as a replacement for a sequential text streamer, and it was SLOOOOOOW in Java. whoah. :-( - docs, including how to change the tokenizer regex, which apparently is the only method to split on characters. Docs elsewhere say that character n-grams are supported, but give no indication of how to get them.



Text Manager

This is a dumb class I’ve created for some simple text output.
It takes an input and tokenizes it, on whitespace.
Then you can iterate through characters and words, or get a random one.
No markov yet, or anything smart. Can’t even return an iterator.
Oh, well!
There’s a glitch in the non-whitespace checker that requires a code-change from Java to Java Script. OF COURSE.



some examples - uses it’s own special code. - uses rita (see above). Displays a markov’d text. Nothing especially “Processing” about the output. - wow! text analysis and visualization - also - randomizes a text. awkward code. - drawing text with vector-lines. Text is rendered to image, then if the pixel has a value, a line is drawn on display. - Letter-pair analysis (processing.js) - Paul Thompson’s processing experiments with and without text. - data analysis of Marvel’s _The Avengers_ comics; ends with a good-looking text piece.



My text sketches

Sketch:024 - polychrometext
Sketch:025 - Image Texter?
Sketch:026 - flocklex



HTML canvas notes



Computational Typography from, found via Making Photomosaics in Processing, which is also reffed from Mosaic which ruminates on text-based mosaics.
Madsen references the unavailable book Typeface as Programme which is now available online. - java library, not js - a library to create font files




// All ASCII characters, sorted according to their visual density
String letterOrder =
  " .`-_':,;^=+/\"|)\\<>)iv%xclrs{*}I?!][1taeo7zjLu" +
(fragment source)


Now say we replace the square blobs in a pixellated image with text (color optional, but comes from the blob-average).
We now have a “text” -- it’s abstract and “meaningless” [by common conventions].
However -- what happens to that text as the size of the blobs change -- the density of the blob changes, and so too does the associated text (character[s]) [the color too]. ....



See Also

WordSalad.TextShopping - for sources to fiddle with
WordSalad.WritingMachines - which, after all, is what I’m talking about building, here.
letters in sequences [0..n] - my Pinterest board relating to text and texters.

Retrieved from
Page last modified on April 26, 2014, at 04:14 PM