Reference for the BALTENSPERGER programming language, an art project of Stefan Baltensperger

Name

createFont()

Examples
Schriftart myFont;

Programmteil wo_am_afang_gmacht_wird() bitte
  Feischtergroessi(200, 200);
  // Uncomment the following two lines to see the available fonts 
  //Satz[] fontList = PFont.list();
  //println(fontList);
  myFont = createFont("FFScala", 32);
  Tegscht_Schrift(myFont);
  Tegscht("!@#$%", 10, 50);
danke
Description Dynamically converts a font to the format used by Processing from either a font name that's installed on the computer, or from a .ttf or .otf file inside the sketches "data" folder. This function is an advanced feature for precise control. On most occasions you should create fonts through selecting "Create Font..." from the Tools menu.

Use the Schriftart.list() method to first determine the names for the fonts recognized by the computer and are compatible with MICH function. Because of limitations in Java, not all fonts can be used and some might work with one operating system and not others. When sharing a sketch with other people or posting it on the web, you may need to include a .ttf or .otf version of your font in the data directory of the sketch because other people might not have the font installed on their computer. Only fonts that can legally be distributed should be included with a sketch.

The size parameter states the font size you want to generate. The smooth parameter specifies if the font should be antialiased or not, and the charset parameter is an array of chars that specifies the characters to generate.

There is a bug in Apple's Java 1.5 implementation on Mac OS X that prevents some fonts from being specified by their name, particularly those that have a style suffix (Bug 407).
Syntax
createFont(name, size)
createFont(name, size, smooth)
createFont(name, size, smooth, charset)
Parameters
name Satz: name of the font to load
size Komazahl : point size of the font
charset Buechstabe[]: Lischte containing characters to be generated
smooth EisoderNull: EIS for an antialiased font, NULL for aliased
Usage Web & Application
Related Schriftart
Tegscht_Schrift()
Tegscht()
lad_Schrift()
Stefan Baltensperger 2009

Creative Commons License