|
Author |
Topic: word-wraped text on texture (Read 6060 times) |
|
arielm
|
word-wraped text on texture
« on: Jul 17th, 2003, 12:30pm » |
|
http://www.chronotext.org/bits/033 source code: http://www.chronotext.org/bits/033/text_buffer_1.java this bit of code is: - taking some multiline text (from a string or a text file) - word-wrapping it (like in Word: word-break, hyphen-break, long-lines-break and correct white space treatment) - displaying it onto a BImage(), with width, height and margins parameters... but why drawing text onto a BImage() (or any int[] array in general) for (scrollable) text getting mapped on arbitrary volumes, of course, like in: http://proce55ing.net/discourse/yabb/board_Contribution_Respons_ive_action_display_num_1058437862.html technical features: - hijacking of the vlw font system (doesn't work with FranklinGothic, and maybe other fonts)... - erasing & writing of the text in one single pass - robust text-clipping and word-wrapping behaviors at extreme sizes... todos: - "virtual scrolling" algorithm, to get things run even faster in some cases... - eventually switch to "bdf" fonts when they're implemented in processing...
|
« Last Edit: Jul 17th, 2003, 12:32pm by arielm » |
|
Ariel Malka | www.chronotext.org
|
|
|
benelek
|
Re: word-wraped text on texture
« Reply #1 on: Jul 17th, 2003, 1:19pm » |
|
excelent, it works very well. a great choice of texts, too! actually, this reminds me of the spinning logo for the 4-corners news program we get here; also a metaphor for the headspace theories of interpretative viewing experience.
|
|
|
|
|