BlinkenApplet/Lauftext Schriftarten/8pxStd

BlinkenApplet->Lauftext Schriftarten->8pxStd

This font is 8 pixels high and called 8pxStd

/** * * BlinkenApplet * Copyright (C) 2006: Guido Pannenbecker  * initiated by Manuel Flöther * Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html * a blinkenarea.org project * * Klasse: Std8pxSchriftart * * Definiert Standart-Schriftart für Lauftext. * * * Created by: cosmea * Date: 2006-06-13 * * */ package baLauftext;

public class Std8pxSchriftart extends Schriftart { public Std8pxSchriftart { }

public int getFontHeight{ return 8; } public boolean isValidChar(String ch) { return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890.:,;-!?*+'%|[]/\" ".indexOf(ch)>=0; }  public String getCharRow(String ch, int row){        if (ch.equals("A")) {        switch (row) {        case 1: return "000000110000000";        case 2: return "000001111000000";        case 3: return "000011011100000";        case 4: return "000111001110000";        case 5: return "001111111111000";        case 6: return "011100000011100";        case 7: return "111000000001110";        case 8: return "000000000000000";        default: return null;        }      } else if (ch.equals("B")) {        switch (row) {        case 1: return "1111110000";        case 2: return "1100011100";        case 3: return "1100001110";        case 4: return "1111111000";        case 5: return "1100001110";        case 6: return "1100000110";        case 7: return "1111111100";        case 8: return "0000000000"; default: return null; }    } else if (ch.equals("C")) { switch (row) { case 1: return "00001110000"; case 2: return "01110001110"; case 3: return "11100000000"; case 4: return "11100000000"; case 5: return "11100000000"; case 6: return "01110001110"; case 7: return "00011111000"; case 8: return "00000000000"; default: return null; }    } else if (ch.equals("D")) { switch (row) { case 1: return "11111110000"; case 2: return "11100011100"; case 3: return "11100001110"; case 4: return "11100001110"; case 5: return "11100001110"; case 6: return "11100011100"; case 7: return "11111110000"; case 8: return "00000000000"; default: return null; }    } else if (ch.equals("E")) { switch (row) { case 1: return "1111111110"; case 2: return "1110000000"; case 3: return "1110000000"; case 4: return "1111111100"; case 5: return "1110000000"; case 6: return "1110000000"; case 7: return "1111111110"; case 8: return "0000000000"; default: return null; }    } else if (ch.equals("F")) { switch (row) { case 1: return "1111111110"; case 2: return "1110000000"; case 3: return "1110000000"; case 4: return "1111111110"; case 5: return "1110000000"; case 6: return "1110000000"; case 7: return "1110000000"; case 8: return "0000000000"; default: return null; }    } else if (ch.equals("G")) { switch (row) { case 1: return "001111110000"; case 2: return "011000011100"; case 3: return "111000000000"; case 4: return "111000000000"; case 5: return "111000111110"; case 6: return "011100001100"; case 7: return "001111110000"; case 8: return "000000000000"; default: return null; }      } else if (ch.equals("H")) { switch (row) { case 1: return "11100001110"; case 2: return "11100001110"; case 3: return "11100001110"; case 4: return "11111111110"; case 5: return "11100001110"; case 6: return "11100001110"; case 7: return "11100001110"; case 8: return "00000000000"; default: return null; }    } else if (ch.equals("I")) { switch (row) { case 1: return "1110"; case 2: return "1110"; case 3: return "1110"; case 4: return "1110"; case 5: return "1110"; case 6: return "1110"; case 7: return "1110"; case 8: return "0000"; default: return null; }    } else if (ch.equals("J")) { switch (row) { case 1: return "000001110"; case 2: return "000001110"; case 3: return "000001110"; case 4: return "000001110"; case 5: return "000001110"; case 6: return "110001110"; case 7: return "011111000"; case 8: return "000000000"; default: return null; }    } else if (ch.equals("K")) { switch (row) { case 1: return "111000111000"; case 2: return "111001110000"; case 3: return "111011100000"; case 4: return "111110000000"; case 5: return "111001110000"; case 6: return "111000111000"; case 7: return "111000001110"; case 8: return "000000000000"; default: return null; }    } else if (ch.equals("L")) { switch (row) { case 1: return "1110000000"; case 2: return "1110000000"; case 3: return "1110000000"; case 4: return "1110000000"; case 5: return "1110000000"; case 6: return "1110000000"; case 7: return "1111111110"; case 8: return "0000000000"; default: return null; }     } else if (ch.equals("M")) { switch (row) { case 1: return "1110000001110"; case 2: return "1111000011110"; case 3: return "1111100111110"; case 4: return "1110111101110"; case 5: return "1110011001110"; case 6: return "1110000001110"; case 7: return "1110000001110"; case 8: return "0000000000000"; default: return null; }    } else if (ch.equals("N")) { switch (row) { case 1: return "111100001110"; case 2: return "111111001110"; case 3: return "111011101110"; case 4: return "111001111110"; case 5: return "111000111110"; case 6: return "111000011110"; case 7: return "111000001110"; case 8: return "000000000000"; default: return null; }    } else if (ch.equals("O")) { switch (row) { case 1: return "000011111000000"; case 2: return "001110000111000"; case 3: return "111000000001110"; case 4: return "111000000001110"; case 5: return "111000000001110"; case 6: return "001110000011100"; case 7: return "000011111000000"; case 8: return "000000000000000"; default: return null; }    } else if (ch.equals("P")) { switch (row) { case 1: return "11111111000"; case 2: return "11100001110"; case 3: return "11100001110"; case 4: return "11111111000"; case 5: return "11100000000"; case 6: return "11100000000"; case 7: return "11100000000"; case 8: return "00000000000"; default: return null; }    } else if (ch.equals("Q")) { switch (row) { case 1: return "00001111100000"; case 2: return "00111000011100"; case 3: return "11100000001110"; case 4: return "11100000001110"; case 5: return "11100000001110"; case 6: return "00111011011100"; case 7: return "00001101111000"; case 8: return "00000000011000"; default: return null; }    } else if (ch.equals("R")) { switch (row) { case 1: return "1111111100000"; case 2: return "1110000111000"; case 3: return "1110000111000"; case 4: return "1101111000000"; case 5: return "1110011100000"; case 6: return "1110000111000"; case 7: return "1110000001110"; case 8: return "0000000000000"; default: return null; }    } else if (ch.equals("S")) { switch (row) { case 1: return "00111111000"; case 2: return "11100001110"; case 3: return "01110000000"; case 4: return "00011100000"; case 5: return "00000011100"; case 6: return "11100001110"; case 7: return "00111111000"; case 8: return "000000000000"; default: return null; }    } else if (ch.equals("T")) { switch (row) { case 1: return "1111111111110"; case 2: return "0000011100000"; case 3: return "0000011100000"; case 4: return "0000011100000"; case 5: return "0000011100000"; case 6: return "0000011100000"; case 7: return "0000011100000"; case 8: return "0000000000000"; default: return null; }    } else if (ch.equals("U")) { switch (row) { case 1: return "111000001110"; case 2: return "111000001110"; case 3: return "111000001110"; case 4: return "111000001110"; case 5: return "111000001110"; case 6: return "111000001110"; case 7: return "001111110000"; case 8: return "000000000000"; default: return null; }    } else if (ch.equals("V")) { switch (row) { case 1: return "111000000000111"; case 2: return "011100000001110"; case 3: return "001110000011100"; case 4: return "000111000111000"; case 5: return "000011101110000"; case 6: return "000001111100000"; case 7: return "000000111000000"; case 8: return "000000000000000"; default: return null; }    } else if (ch.equals("W")) { switch (row) { case 1: return "111000000001110"; case 2: return "111000000001110"; case 3: return "111000110001110"; case 4: return "111001110001110"; case 5: return "111011011101110"; case 6: return "110110000111110"; case 7: return "111000000001110"; case 8: return "000000000000000"; default: return null; }    } else if (ch.equals("X")) { switch (row) { case 1: return "1110000001110"; case 2: return "0111000111000"; case 3: return "0011101110000"; case 4: return "0000111000000"; case 5: return "0011101110000"; case 6: return "0111000111000"; case 7: return "1110000001110"; case 8: return "0000000000000"; default: return null; }    } else if (ch.equals("Y")) { switch (row) { case 1: return "1110000001110"; case 2: return "0111000011100"; case 3: return "0011101110000"; case 4: return "0000111000000"; case 5: return "0000111000000"; case 6: return "0000111000000"; case 7: return "0000111000000"; case 8: return "0000000000000"; default: return null; }   } else if (ch.equals("Z")) { switch (row) { case 1: return "1111111111110"; case 2: return "0000000111000"; case 3: return "0000001110000"; case 4: return "0000111000000"; case 5: return "0001110000000"; case 6: return "0111000000000"; case 7: return "1111111111110"; case 8: return "0000000000000"; default: return null; }    } else if (ch.equals("a")) { switch (row) { case 1: return "000000000000"; case 2: return "000000000000"; case 3: return "000111011100"; case 4: return "011100011100"; case 5: return "111000011100"; case 6: return "011100011100"; case 7: return "001111111110"; case 8: return "000000000000"; default: return null; }    } else if (ch.equals("b")) { switch (row) { case 1: return "111000000"; case 2: return "111000000"; case 3: return "111000000"; case 4: return "111111100"; case 5: return "111001110"; case 6: return "111001110"; case 7: return "111111100"; case 8: return "000000000"; default: return null; }    } else if (ch.equals("c")) { switch (row) { case 1: return "00000000"; case 2: return "00000000"; case 3: return "00011110"; case 4: return "01110000"; case 5: return "11100000"; case 6: return "01110000"; case 7: return "00011110"; case 8: return "00000000"; default: return null; }    } else if (ch.equals("d")) { switch (row) { case 1: return "00001110"; case 2: return "00001110"; case 3: return "00001110"; case 4: return "01111110"; case 5: return "11001110"; case 6: return "11001110"; case 7: return "01111110"; case 8: return "00000000"; default: return null; }    } else if (ch.equals("e")) { switch (row) { case 1: return "0000000000"; case 2: return "0000000000"; case 3: return "0011110000"; case 4: return "1100011100"; case 5: return "1111111110"; case 6: return "1100000000"; case 7: return "0111111000"; case 8: return "0000000000"; default: return null; }     } else if (ch.equals("f")) { switch (row) { case 1: return "00001110"; case 2: return "00110000"; case 3: return "11111110"; case 4: return "00111000"; case 5: return "00111000"; case 6: return "00111000"; case 7: return "00111000"; case 8: return "00000000"; default: return null; }    } else if (ch.equals("g")) { switch (row) { case 1: return "0000000000"; case 2: return "0000000000"; case 3: return "0001110000"; case 4: return "0111001110"; case 5: return "1110001110"; case 6: return "0111001110"; case 7: return "0000011100"; case 8: return "0011100000"; default: return null; }    } else if (ch.equals("h")) { switch (row) { case 1: return "000000000"; case 2: return "111000000"; case 3: return "111000000"; case 4: return "111111000"; case 5: return "111001110"; case 6: return "110001110"; case 7: return "111001110"; case 8: return "000000000"; default: return null; }    } else if (ch.equals("i")) { switch (row) { case 1: return "0000"; case 2: return "1110"; case 3: return "0000"; case 4: return "1110"; case 5: return "1110"; case 6: return "1110"; case 7: return "1110"; case 8: return "0000"; default: return null; }    } else if (ch.equals("j")) { switch (row) { case 1: return "0000000"; case 2: return "0001110"; case 3: return "0000000"; case 4: return "0001110"; case 5: return "0001110"; case 6: return "0001110"; case 7: return "0001110"; case 8: return "1111000"; default: return null; }    } else if (ch.equals("k")) { switch (row) { case 1: return "111000000"; case 2: return "111000000"; case 3: return "111001110"; case 4: return "111011100"; case 5: return "111110000"; case 6: return "111011100"; case 7: return "111001110"; case 8: return "000000000"; default: return null; }    } else if (ch.equals("l")) { switch (row) { case 1: return "1110"; case 2: return "1110"; case 3: return "1110"; case 4: return "1110"; case 5: return "1110"; case 6: return "1110"; case 7: return "1110"; case 8: return "0000"; default: return null; }    } else if (ch.equals("m")) { switch (row) { case 1: return "00000000000000"; case 2: return "00000000000000"; case 3: return "11111111111100"; case 4: return "01110011001110"; case 5: return "01110011001110"; case 6: return "01110011001110"; case 7: return "01110011001110"; case 8: return "00000000000000"; default: return null; }    } else if (ch.equals("n")) { switch (row) { case 1: return "0000000000"; case 2: return "0000000000"; case 3: return "1111111100"; case 4: return "0111001110"; case 5: return "0111001110"; case 6: return "0111001110"; case 7: return "0111001110"; case 8: return "0000000000"; default: return null; }    } else if (ch.equals("o")) { switch (row) { case 1: return "00000000000"; case 2: return "00000000000"; case 3: return "00011100000"; case 4: return "01110011100"; case 5: return "11100001110"; case 6: return "01110011100"; case 7: return "00011100000"; case 8: return "00000000000"; default: return null; }     } else if (ch.equals("p")) { switch (row) { case 1: return "000000000"; case 2: return "000000000"; case 3: return "111011100"; case 4: return "110001110"; case 5: return "110001110"; case 6: return "111011100"; case 7: return "111000000"; case 8: return "111000000"; default: return null; }    } else if (ch.equals("q")) { switch (row) { case 1: return "00000000"; case 2: return "00000000"; case 3: return "00111000"; case 4: return "11001110"; case 5: return "11001110"; case 6: return "01111110"; case 7: return "00001110"; case 8: return "00001110"; default: return null; }    } else if (ch.equals("r")) { switch (row) { case 1: return "000000000"; case 2: return "000000000"; case 3: return "011011110"; case 4: return "001110000"; case 5: return "001110000"; case 6: return "001110000"; case 7: return "001110000"; case 8: return "000000000"; default: return null; }    } else if (ch.equals("s")) { switch (row) { case 1: return "00000000"; case 2: return "00000000"; case 3: return "01111110"; case 4: return "11100000"; case 5: return "00111100"; case 6: return "00001110"; case 7: return "11111110"; case 8: return "00000000"; default: return null; }    } else if (ch.equals("t")) { switch (row) { case 1: return "00111000"; case 2: return "00111000"; case 3: return "11111110"; case 4: return "00111000"; case 5: return "00111000"; case 6: return "00111000"; case 7: return "00011100"; case 8: return "00000000"; default: return null; }     } else if (ch.equals("u")) { switch (row) { case 1: return "000000000"; case 2: return "000000000"; case 3: return "111001110"; case 4: return "111001110"; case 5: return "111001110"; case 6: return "111001110"; case 7: return "011111110"; case 8: return "000000000"; default: return null; }    } else if (ch.equals("v")) { switch (row) { case 1: return "000000000000"; case 2: return "000000000000"; case 3: return "111000001110"; case 4: return "011100011100"; case 5: return "001110111000"; case 6: return "000111110000"; case 7: return "000011100000"; case 8: return "000000000000"; default: return null; }    } else if (ch.equals("w")) { switch (row) { case 1: return "0000000000000"; case 2: return "0000000000000"; case 3: return "1110000001110"; case 4: return "0111001001110"; case 5: return "0111011001110"; case 6: return "0111100111110"; case 7: return "1111000011110"; case 8: return "0000000000000"; default: return null; }    } else if (ch.equals("x")) { switch (row) { case 1: return "0000000000"; case 2: return "0000000000"; case 3: return "1110001110"; case 4: return "0011011100"; case 5: return "0001100000"; case 6: return "0110011100"; case 7: return "1110001110"; case 8: return "0000000000"; default: return null; }   }  else if (ch.equals("y")) { switch (row) { case 1: return "0000000000"; case 2: return "0000000000"; case 3: return "1110001110"; case 4: return "0111011100"; case 5: return "0001111000"; case 6: return "0000111000"; case 7: return "0001110000"; case 8: return "0111000000"; default: return null; }    } else if (ch.equals("z")) { switch (row) { case 1: return "0000000000"; case 2: return "0000000000"; case 3: return "1111111110"; case 4: return "0000011100"; case 5: return "0001110000"; case 6: return "0011100000"; case 7: return "1111111110"; case 8: return "0000000000"; default: return null; }    } else if (ch.equals("1")) { switch (row) { case 1: return "000000"; case 2: return "111000"; case 3: return "011100"; case 4: return "011100"; case 5: return "011100"; case 6: return "011100"; case 7: return "111110"; case 8: return "000000"; default: return null; }    } else if (ch.equals("2")) { switch (row) { case 1: return "000000000"; case 2: return "011111100"; case 3: return "110001110"; case 4: return "000011100"; case 5: return "000111000"; case 6: return "011100000"; case 7: return "111111110"; case 8: return "000000000"; default: return null; }    } else if (ch.equals("3")) { switch (row) { case 1: return "000000000"; case 2: return "111111000"; case 3: return "000111000"; case 4: return "011100000"; case 5: return "000011100"; case 6: return "000001110"; case 7: return "111111000"; case 8: return "000000000"; default: return null; }    } else if (ch.equals("4")) { switch (row) { case 1: return "000000000000"; case 2: return "000001110000"; case 3: return "000011110000"; case 4: return "000101110000"; case 5: return "011101110000"; case 6: return "111111111110"; case 7: return "000001110000"; case 8: return "000000000000"; default: return null; }    } else if (ch.equals("5")) { switch (row) { case 1: return "00000000"; case 2: return "11111110"; case 3: return "11100000"; case 4: return "11110000"; case 5: return "00011100"; case 6: return "00000111"; case 7: return "11111110"; case 8: return "00000000"; default: return null; }    } else if (ch.equals("6")) { switch (row) { case 1: return "00000000000"; case 2: return "00001110000"; case 3: return "00011100000"; case 4: return "00111000000"; case 5: return "01110111000"; case 6: return "11100001110"; case 7: return "00111111000"; case 8: return "00000000000"; default: return null; }    } else if (ch.equals("7")) { switch (row) { case 1: return "0000000000"; case 2: return "1111111110"; case 3: return "0000011100"; case 4: return "0000111000"; case 5: return "0001110000"; case 6: return "0001110000"; case 7: return "0001110000"; case 8: return "0000000000"; default: return null; }     } else if (ch.equals("8")) { switch (row) { case 1: return "0001110000"; case 2: return "0110001110"; case 3: return "0110001110"; case 4: return "0011111100"; case 5: return "0110001100"; case 6: return "1100000110"; case 7: return "0111111100"; case 8: return "0000000000"; default: return null; }    } else if (ch.equals("9")) { switch (row) { case 1: return "000000000000"; case 2: return "000110111000"; case 3: return "011100001110"; case 4: return "011000001110"; case 5: return "001110111000"; case 6: return "000001110000"; case 7: return "000111000000"; case 8: return "000000000000"; default: return null; }    } else if (ch.equals("0")) { switch (row) { case 1: return "0000000000000"; case 2: return "0000111000000"; case 3: return "0011100111000"; case 4: return "1110000011100"; case 5: return "1110000001110"; case 6: return "0111000011100"; case 7: return "0001111000000"; case 8: return "0000000000000"; default: return null; }    } else if (ch.equals(".")) { switch (row) { case 1: return "000"; case 2: return "000"; case 3: return "000"; case 4: return "000"; case 5: return "000"; case 6: return "110"; case 7: return "110"; case 8: return "000"; default: return null; }    } else if (ch.equals(":")) { switch (row) { case 1: return "000"; case 2: return "000"; case 3: return "000"; case 4: return "110"; case 5: return "000"; case 6: return "110"; case 7: return "000"; case 8: return "000"; default: return null; }    } else if (ch.equals(",")) { switch (row) { case 1: return "0000"; case 2: return "0000"; case 3: return "0000"; case 4: return "0000"; case 5: return "0000"; case 6: return "0110"; case 7: return "1110"; case 8: return "1100"; default: return null; }    } else if (ch.equals(";")) { switch (row) { case 1: return "0000"; case 2: return "0000"; case 3: return "0000"; case 4: return "0110"; case 5: return "0000"; case 6: return "0110"; case 7: return "1110"; case 8: return "1100"; default: return null; }    } else if (ch.equals("-")) { switch (row) { case 1: return "0000000"; case 2: return "0000000"; case 3: return "0000000"; case 4: return "0000000"; case 5: return "1111110"; case 6: return "0000000"; case 7: return "0000000"; case 8: return "0000000"; default: return null; }    } else if (ch.equals("!")) { switch (row) { case 1: return "1110"; case 2: return "1110"; case 3: return "1110"; case 4: return "1100"; case 5: return "1100"; case 6: return "0000"; case 7: return "1110"; case 8: return "0000"; default: return null; }    } else if (ch.equals("?")) { switch (row) { case 1: return "111100000"; case 2: return "000011100"; case 3: return "000001110"; case 4: return "000011100"; case 5: return "011100000"; case 6: return "000000000"; case 7: return "011100000"; case 8: return "011100000"; default: return null; }    } else if (ch.equals("(")) {       switch (row) {       case 1: return "001110";       case 2: return "011100";       case 3: return "111000";       case 4: return "111000";       case 5: return "111000";       case 6: return "011100";       case 7: return "001110";       case 8: return "000000";       default: return null;       }     } else if (ch.equals(")")) { switch (row) { case 1: return "111000"; case 2: return "011100"; case 3: return "001110"; case 4: return "001110"; case 5: return "001110"; case 6: return "011100"; case 7: return "111000"; case 8: return "000000"; default: return null; }    } else if (ch.equals("*")) { switch (row) { case 1: return "0000011100000"; case 2: return "0110011100110"; case 3: return "0001011101000"; case 4: return "1111111111110"; case 5: return "0001011101000"; case 6: return "0110011100110"; case 7: return "0000011100000"; case 8: return "0000000000000"; default: return null; }    } else if (ch.equals("+")) { switch (row) { case 1: return "00000000"; case 2: return "00111000"; case 3: return "00111000"; case 4: return "11111110"; case 5: return "00111000"; case 6: return "00111000"; case 7: return "00000000"; case 8: return "00000000"; default: return null; }    } else if (ch.equals("'")) { switch (row) { case 1: return "1110"; case 2: return "1110"; case 3: return "0110"; case 4: return "0000"; case 5: return "0000"; case 6: return "0000"; case 7: return "0000"; case 8: return "0000"; default: return null; }    } else if (ch.equals("%")) { switch (row) { case 1: return "110000110"; case 2: return "110001100"; case 3: return "000011000"; case 4: return "000110000"; case 5: return "001100000"; case 6: return "011000110"; case 7: return "110000110"; case 8: return "000000000"; default: return null; }    } else if (ch.equals("|")) { switch (row) { case 1: return "110"; case 2: return "110"; case 3: return "110"; case 4: return "110"; case 5: return "110"; case 6: return "110"; case 7: return "110"; case 8: return "000"; default: return null; }    } else if (ch.equals("[")) { switch (row) { case 1: return "11110"; case 2: return "11000"; case 3: return "11000"; case 4: return "11000"; case 5: return "11000"; case 6: return "11000"; case 7: return "11110"; case 8: return "00000"; default: return null; }    } else if (ch.equals("]")) { switch (row) { case 1: return "11110"; case 2: return "00110"; case 3: return "00110"; case 4: return "00110"; case 5: return "00110"; case 6: return "00110"; case 7: return "11110"; case 8: return "00000"; default: return null; }    } else if (ch.equals("/")) { switch (row) { case 1: return "000000110"; case 2: return "000001100"; case 3: return "000011000"; case 4: return "000110000"; case 5: return "001100000"; case 6: return "011000000"; case 7: return "110000000"; case 8: return "000000000"; default: return null; }    } else if (ch.equals("\"")) {            switch (row) {       case 1: return "1101100";       case 2: return "1101100";       case 3: return "010010";       case 4: return "000000";       case 5: return "000000";       case 6: return "000000";       case 7: return "000000";       case 8: return "000000";       default: return null;       }     } else if (ch.equals(" ")) {       switch (row) {       case 1: return "000000";       case 2: return "000000";       case 3: return "000000";       case 4: return "000000";       case 5: return "000000";       case 6: return "000000";       case 7: return "000000";       case 8: return "000000";       default: return null;       }       } else {  // Invalid Char       switch (row) {       case 1: return "111111110";       case 2: return "110000110";       case 3: return "110000110";       case 4: return "110000110";       case 5: return "110000110"; case 6: return "110000110"; case 7: return "110000110"; case 8: return "111111110"; default: return null; }      /*       switch (row) { case 1: return ""; case 2: return ""; case 3: return ""; case 4: return ""; case 5: return ""; case 6: return ""; case 7: return ""; case 8: return ""; default: return null; }      */     }

} }