forked from jdf/processing-py-site
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPFont.xml
More file actions
28 lines (21 loc) · 1.13 KB
/
PFont.xml
File metadata and controls
28 lines (21 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>PFont</name>
<category>Typography</category>
<subcategory></subcategory>
<type></type>
<example>
<image />
<code><![CDATA[
# The font must be located in the sketch's
# "data" directory to load successfully
font = loadFont("LetterGothicStd-32.vlw")
textFont(font, 32)
text("word", 10, 50)
]]></code>
</example>
<description><![CDATA[
PFont is the font class for Processing. To create a font to use with Processing, select "Create Font..." from the Tools menu. This will create a font in the format Processing requires and also adds it to the current sketch's data directory. Processing displays fonts using the .vlw font format, which uses images for each letter, rather than defining them through vector data. The <b>loadFont()</b> function constructs a new font and <b>textFont()</b> makes a font active. The <b>list()</b> method creates a list of the fonts installed on the computer, which is useful information to use with the <b>createFont()</b> function for dynamically converting fonts into a format to use with Processing.
]]></description>
<related>loadFont</related>
</root>