Processing=003 01=font

Preview:

DESCRIPTION

A_Little_Bit_Processing_Tutorial

Citation preview

Processing

Font

0301

字體

Font字

Gary told me:

-----------------------If I want to know something, check

the references.蓋瑞跟我說

如果不知道怎麼做就先去找參考(references)

http://www.processing.org/reference/PFont.html

PFont font;

void setup(){

size(500,500);

font = loadFont("Helvetica-48.vlw");

}

void draw(){

textFont(font, 48);

text("word", 10, 50);

}

Create a font

Load a font

Content & Loc

Font size

創造一個字體物件

載入字體

字體大小

內容跟位置

WHAT!!!!!!!

How to fix it?

甚麼!!!!!!!!!!

怎麼修阿?

But before that

-----------You need to

save your file.在這之前

我們得先存檔

NOW We need to create a “FONT”再來可以創建一個字體拉

Select the one you want.

(also match with the code.)

選你要的(也要跟CODE裡面寫的一樣)

Select the one you want.

(also match with the code.)

Then Press “OK” 然後按“OK”

Inside your saved folder, there will be a “data” folder.

And you will find your font file inside.

選你要的(也要跟CODE裡面寫的一樣)

然後你就會發現你的字體檔案

Now it works!

行了

Think of how to create

different fonts

想想看怎麼可以怎麼用不同字體

PFont font01;

void setup(){

background(0);

size(1260,945);

font01 = loadFont("Meiryo-BoldItalic-48.vlw");

}

void draw(){

textFont(font01, 48);

for(int i =0; i< width; i+=105){

for(int j =0; j< height; j+=36){

//fill(map(i,0,width,0,255),map(j,0,height,0,255),100);

fill(random(0,255),random(0,255),random(0,255));

text("Gary", i, j);

}

}

}

Recommended