zeven dingbat fonts van Don Zadorozny. terug naar de inleiding naar de dingbat animatie in fullscreen
Deze fonts gedownload van zijn website iconian
toetsfuncties
met toetsen 1 t/m 0 en toetsen q, w, e, r, t en y worden 6 dingbats in paren van twee de getoond
Zo zie je 16 x 3 = 96 dingbats per font, met 7 fonts is dit totaal 7 x 96 = 672 dingbats allemaal gemaakt door Dan Zadorozny.
toetsen waarmee de zeven fonts worden geselecteerd
toets "z" = galaxy far away,
toets "x" = hall of heroes
toets "c" = look sir droids
toets "v" = weendings
toets "b" = fantastic
toets "n" = iluminated conspiracy
toets "m" = imaginary forces
De afbeelding downloaden met de "d" toets
De schets maakt ook gebruik van de class "Text" met fontkeuze mogelijkheid en de superclass "Vormen"
//argumenten van de constructor: 1) tekst string, 2) lettergrootte, 3) draaipunt,
//4) x positie, 5) y positie, 6) hoek, 7) font 1 t/m 6, 8) letterkleur
//9) lijn dikte, 10) lijnkleur
let font0, font1, font2, font3;
function setup() {
createCanvas(windowWidth, windowHeight);
const x = width/2;
const y = height/2;
const n = height/25;
//ruitjespap = new Ruitjes(n, x, y);
//constructor 1 2 3 4 5 6 7 8 9 10
font0 = new Text('!"', 8*n, 0, x-15*n, y+4*n, 0, 1, color(0,0,250,150), n, color(255,0,0,150));
font1 = new Text("#$", 8*n, 0, x, y-6*n, 0, 1, color(0,0,250,150), n*4,color(255,255,0,150));
font2 = new Text("%&", 8*n, 0, x+15*n, y+4*n, 0, 1, color(200,0,250,150),n, color(0,255,255,150));
//constructor 1 2 3 4 5 6 7 8 9 10
font3 = new Text("galaxy far away",2*n,1,x-22*n,y-10*n,0,3,color(200,0,250,150),3,color(-0,255,255,150));
}
function draw() {
background(230,251,255);
// ruitjespap.display();
font0.display();
font1.display();//
font2.display();
font3.display();
// font1.dpRotRe(font1);
}
function windowResized() {
resizeCanvas(windowWidth, windowHeight);
}
function keyPressed() {
if (key == 'd' || key == 'D') {
save('dingbats.png');
}
if (key == '1') {
font0.text = '!"'; font1.text = "#$"; font2.text = "%&";
}
if (key == '2') {
font0.text = "'("; font1.text = ",+"; font2.text = ")*";
}
if (key == '3') {
font0.text = "-."; font1.text = "/0"; font2.text = "12";
}
if (key == '4') {
font0.text = "34"; font1.text = "56"; font2.text = "78";
}
if (key == '5') {
font0.text = "9:"; font1.text = ";="; font2.text = "<>";
}
if (key == '6') {
font0.text = "?@"; font1.text = "AB"; font2.text = "CD";
}
if (key == '7') {
font0.text = "EF"; font1.text = "GH"; font2.text = "IJ";
}
if (key == '8') {
font0.text = "KL"; font1.text = "MN"; font2.text = "OP";
}
if (key == '9') {
font0.text = "QR"; font1.text = "ST"; font2.text = "UV";
}
if (key == '0') {
font0.text = "WX"; font1.text = "YZ" ; font2.text = '[';
}
if (key == 'q') {
font0.text = "]^"; font1.text = "_'" ; font2.text = 'ab';
}
if (key == 'w') {
font0.text = "cd"; font1.text = "ef" ; font2.text = 'gh';
}
if (key == 'e') {
font0.text = "ij"; font1.text = "kl" ; font2.text = 'mn';
}
if (key == 'r') {
font0.text = "op"; font1.text = "qr" ; font2.text = 'st';
}
if (key == 't') {
font0.text = "uv"; font1.text = "wx" ; font2.text = 'yz';
}
if (key == 'y') {
font0.text = "{|"; font1.text = "~" ; font2.text = '}';
}
if (key == "z" || key == "Z") {
font3.text = "galaxy far away"
font0.f = 1; font1.f = 1; font2.f = 1;
font0.c = color(0,0,250,150); font0.c2 = color(255,0,0,150);
font1.c = color(0,0,250,150); font1.c2 = color(255,255,0,150);
font2.c = color(200,0,250,150);font2.c2 = color(0,255,255,150);
}
if (key == "x" || key == "X") {
font3.text = "hall of heroes"
font0.f = 4; font1.f = 4; font2.f = 4;
font0.c = color(0, 241, 90,150); font0.c2 = color(255,0,0,150);
font1.c = color(255, 0, 0,150); font1.c2 = color(0,255,0,150);
font2.c = color(0, 255, 241,150);font2.c2 = color(0,0,255,150);
}
if (key == "c" || key == "C") {
font3.text = "look sir droids"
font0.f = 2; font1.f = 2; font2.f = 2;
font0.c = color(255, 0, 0,150); font0.c2 = color(26, 198, 255,150);
font1.c = color(0,0,250,150); font1.c2 = color(255, 255, 0,150);
font2.c = color(0,0,255,150);font2.c2 = color(255, 102, 102,150);
}
if (key == "v" || key == "V") {
font3.text = "weendings"
font0.f = 5; font1.f = 5; font2.f = 5;
font1.c = color(0,0,250,150); font0.c2 = color(255,0,0,150);
font1.c = color(0,0,250,150); font1.c2 = color(255,255,0,150);
font0.c = color(200,0,250,150);font2.c2 = color(0,255,255,150);
}
if (key == "b" || key == "B") {
font3.text = "fantastic"
font0.f = 6; font1.f = 6; font2.f = 6;
font0.c = color(0,0,250,150); font0.c2 = color(255,0,0,150);
font1.c = color(0,0,250,150); font1.c2 = color(255,255,0,150);
font2.c = color(200,0,250,150);font2.c2 = color(0,255,255,150);
}
if (key == "n" || key == "N") {
font3.text = "iluminated conspiracy"
font0.f = 7; font1.f = 7; font2.f = 7;
font0.c = color(0,0,250,150); font0.c2 = color(255,0,0,150);
font1.c = color(0,0,250,150); font1.c2 = color(255,255,0,150);
font2.c = color(0,0,250,150);font2.c2 = color(0,255,0,150);
}
if (key == "m" || key == "M") {
font3.text = "imaginary forces"
font0.f = 8; font1.f = 8; font2.f = 8;
font0.c = color(241, 15, 18,150); font0.c2 = color(0, 255, 0,150);
font1.c = color(15, 15, 241,150); font1.c2 = color(255, 255, 0,150);
font2.c = color(241, 15, 50,150);font2.c2 = color(100, 0, 255,150);
}
}