201707-15 textFont()文本字体 textFont() 例子 PFont mono; // The font "andalemo.ttf" must be located in the // current sketch's "data" directory to load successfully mono = load.... Read More >
201707-15 textDescent()文本下行高度 textDescent() 例子 float base = height * 0.75; float scalar = 0.8; // Different for each font textSize(32); // Set initial text size float a = text.... Read More >
201707-15 textAscent()文本上行间距 textAscent() 例子 float base = height * 0.75; float scalar = 0.8; // Different for each font textSize(32); // Set initial text size float a = textA.... Read More >
201707-15 textAlign()文本对齐方式 textAlign() 例子 background(0); textSize(16); textAlign(RIGHT); text("ABCD", 50, 30); textAlign(CENTER); text("EFGH", 50, 50); textAlign(LEFT); text.... Read More >
201707-15 text()绘制文本 text() 例子 textSize(32); text("word", 10, 30); fill(0, 102, 153); text("word", 10, 60); fill(0, 102, 153, 51); text("word", 10, 90); size(100, .... Read More >
201707-15 PFont字体类 PFont 例子 example pic PFont font; // The font must be located in the sketch's // "data" directory to load successfully font = createFont("LetterGothicStd.ttf", 32); textFont(font); text("word", 10, .... Read More >
201707-15 loadFont()加载字体 loadFont() 例子 example pic PFont font; // The font must be located in the sketch's // "data" directory to load successfully font = loadFont("LetterGothicStd-32.vlw"); textFont(font, 32); text("word".... Read More >
201707-15 createFont()新建字体 createFont() 例子 PFont myFont; void setup() { size(200, 200); // Uncomment the following two lines to see the available fonts //String[] fontList = PFont.list(); //printArray(fontList); .... Read More >