Processing=003 01=font

17
Processing Font 03 01 字體

description

A_Little_Bit_Processing_Tutorial

Transcript of Processing=003 01=font

Page 1: Processing=003 01=font

Processing

Font

0301

字體

Page 2: Processing=003 01=font

Font字

Page 3: Processing=003 01=font

Gary told me:

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

the references.蓋瑞跟我說

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

Page 4: Processing=003 01=font

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

Page 5: Processing=003 01=font

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

創造一個字體物件

載入字體

字體大小

內容跟位置

Page 6: Processing=003 01=font

WHAT!!!!!!!

How to fix it?

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

怎麼修阿?

Page 7: Processing=003 01=font

But before that

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

save your file.在這之前

我們得先存檔

Page 8: Processing=003 01=font
Page 9: Processing=003 01=font

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

Page 10: Processing=003 01=font

Select the one you want.

(also match with the code.)

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

Page 11: Processing=003 01=font

Select the one you want.

(also match with the code.)

Then Press “OK” 然後按“OK”

Page 12: Processing=003 01=font

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

And you will find your font file inside.

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

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

Page 13: Processing=003 01=font

Now it works!

行了

Page 14: Processing=003 01=font

Think of how to create

different fonts

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

Page 16: Processing=003 01=font
Page 17: Processing=003 01=font

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);

}

}

}