forked from processing/p5.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
35 lines (24 loc) · 706 Bytes
/
index.html
File metadata and controls
35 lines (24 loc) · 706 Bytes
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
29
30
31
32
33
34
35
<meta charset=utf-8>
<meta name=viewport
content=width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1>
<title>Load Font Test</title>
<script src="http://p5js.org/assets/js/p5.min.js"></script>
<script>
// http://forum.Processing.org/two/discussion/11116/loadfont-is-not-defined
// http://GoToLoop.GitHub.io/p5.js/
// GoToLoop (2015-Oct-08)
var nexa;
function preload() {
nexa = loadFont('data/NexaRustHandmade.otf');
}
function setup() {
createCanvas(600, 400);
noLoop();
fill(50, 200, 5).noStroke();
textFont(nexa).textAlign(CENTER, CENTER).textSize(040);
}
function draw() {
background(0350);
text('NexaRustHandmade Special!', width>>1, height>>1);
}
</script>