Font doesn't show up in Javascript mode?
in
Processing with Other Languages
•
1 month ago
The following code experiences no technical difficulties, but the font
baskerville doesn't seem to apply in Javascript mode. Any ideas?
PFont Font;
void setup(){
size(1300,800);
background(240,255,240);
}
void draw(){
Font =
loadFont("Baskerville-48
.
vlw");
textFont(Font);
text("US Population Chart
:1900-2000", 300, 200);
strokeWeight(4);
stroke(60,179,113);
line(50,750,50,50);
line(50,750,1250,750);
for(
int i=1
;
i<12
;i++){
textSize(20);
fill(255,127,80);
text(
int(1890+10*i), i*100, 775);
}
for(
int i=1
;
i<12
;i++){
textSize(15);
fill(255,127,80);
text(
int(
i-1)*50 + "M", 10 ,750-((
i-1)*100));
}
stroke(60,179,113);
strokeWeight(4);
fill(255,160,122);
rect(75,750-(76*2)
,100,76*2);
rect(175,750-(92*2)
,100,92*2);
rect(275,750-(106*2)
,100,106*2);
rect(375,750-(123*2)
,100,123*2);
rect(475,750-(132*2)
,100,132*2);
rect(575,750-(152*2)
,100,152*2);
rect(675,750-(180*2)
,100,180*2);
rect(775,750-(205*2)
,100,205*2);
rect(875,750-(227*2)
,100,227*2);
rect(975,750-(249*2)
,100,249*2);
rect(1075,750-(281*2)
,100,281*2);
}
1