Cheat sheets for exams
Continuing…
Continuing on Tuesday’s class.
Stuff worth reading
To do
We will finish up
Strings and
Drawing Text by David Shiffman.
References for fonts
-
textSize()
Sets the font size. There is a lot more about this…
-
PFont
Font class for Proceesing.
-
Pfont.list()
This is a Java class method for listing available fonts.
-
createFont()
Converts vector fonts
(.ttf or
.otf)
into a size-specific .vlw
font where each letter has a texture
When posting a sketch on the web, you should include the
.ttf
or .otf
file in the sketch data directory.
-
loadFont()
Loads a .vlw
file from the sketch data directory.
Use Processing’s
Create Font…
tool to create and install the .vlw
in your sketch data directory.
-
textFont()
Sets the current font.
References about writing text
-
text()
Writes words on the screen.
-
textWidth()
Width of text when displayed in current font and size.
-
textAscent()
Ascent (above the baseline) of current font.
-
textDescent()
Descent (below the baseline) of current font.
Look at Monica’s Site
tutorial on
Drawing
Styled Text
for a geeky Java-based discussion of these terms.