×
Create a new article
Write your page title here:
We currently have 3,188 articles on s23. Type your article name above or create one of the articles listed here!



    s23
    3,188Articles

    BlinkenApplet/Lauftext Schriftarten/5pxStd

    BlinkenApplet->Lauftext Schriftarten->5pxStd

    <blinken delay=1 bgcolor="255,255,255" lamponcolor="70,240,70" lampoffcolor="255,255,255" font="5pxStd">This font is called 5pxStd</blinken><br />

    <blinken delay=1 bgcolor="0,0,0" lamponcolor="70,240,70" lampoffcolor="23,23,23" font="5pxStd">test: ,;.-?!/\üöä^°´`&@<>|</blinken>

    Bitte fertigstellen (ein paar Sonderzeichen fehlen noch.)

    Ausserdem kann man ganz neu die Dateien BlinkenApplet/Lauftext_Schriftarten/8pxStd und BlinkenApplet/Lauftext_Schriftarten/8pxBold anlegen :)

    Ein Beispiel für eine fertige Schriftart, die von der Std-Schriftart vererbt wurde ist BlinkenApplet/Lauftext_Schriftarten/MorseCode.

    /**
     * 
     * BlinkenApplet
     * Copyright (C) 2006: Guido Pannenbecker <took@sd-gp.de>
     * initiated by Manuel Flöther
     * Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html
     * a blinkenarea.org project
     * 
     * Klasse: Schriftart
     *
     * Definiert Standart-Schriftart für Lauftext.
     *
     *
     * Created by: Guido Pannenbecker
     * Date: 2006-06-11
     *
     * History:
     *
     * 2006-06-12, Guido: Schriftart fertiggestellt
     * 2006-06-16, Guido: einige Sonderzeichen hinzugefügt
     * 
     */
    package baLauftext;
    
    public class Schriftart {
      
      public Schriftart() {
      }
    
      public int getFontHeight(){
        return 5;
      }
      
      public boolean isValidChar(String ch) {
        return "AÄBCDEFGHIJKLMNOÖPQRSTUÜVWXYZ0123456789-+.() ".indexOf(ch)>=0;
      }
     
      
      public String getCharRow(String ch, int row){
        ch=ch.toUpperCase();
        if (ch.equals("A") || ch.equals("Ä")) {
            switch (row) {
            case 1: return "000110000";
            case 2: return "001111000";
            case 3: return "011001100";
            case 4: return "011111100";
            case 5: return "110000110";
            default: return null;
            }
          } else if (ch.equals("B")) {
            switch (row) {
            case 1: return "11111100";
            case 2: return "11000110";
            case 3: return "11111100";
            case 4: return "11000110";
            case 5: return "11111100";
            default: return null;
            }
          } else if (ch.equals("C")) {
            switch (row) {
            case 1: return "001111110";
            case 2: return "011000110";
            case 3: return "110000000";
            case 4: return "110000110";
            case 5: return "011111100";
            default: return null;
            }        
          } else if (ch.equals("D")) {
            switch (row) {
            case 1: return "11111100";
            case 2: return "01100110";
            case 3: return "01100110";
            case 4: return "01100110";
            case 5: return "11111100";
            default: return null;
            }        
          } else if (ch.equals("E")) {
            switch (row) {
            case 1: return "1111110";
            case 2: return "1100000";
            case 3: return "1111000";
            case 4: return "1100000";
            case 5: return "1111110";
            default: return null;
            }        
          } else if (ch.equals("F")) {
            switch (row) {
            case 1: return "1111110";
            case 2: return "1100000";
            case 3: return "1111000";
            case 4: return "1100000";
            case 5: return "1100000";
            default: return null;
            }        
          } else if (ch.equals("G")) {
            switch (row) {
            case 1: return "00111110";
            case 2: return "01100000";
            case 3: return "11001110";
            case 4: return "01100110";
            case 5: return "00111100";
            default: return null;
            }        
          } else if (ch.equals("H")) {
            switch (row) {
            case 1: return "11000110";
            case 2: return "11000110";
            case 3: return "11111110";
            case 4: return "11000110";
            case 5: return "11000110";
            default: return null;
            }        
          } else if (ch.equals("I")) {
            switch (row) {
            case 1: return "11110";
            case 2: return "01100";
            case 3: return "01100";
            case 4: return "01100";
            case 5: return "11110";
            default: return null;
            }        
          } else if (ch.equals("J")) {
            switch (row) {
            case 1: return "00011110";
            case 2: return "00001100";
            case 3: return "00001100";
            case 4: return "11001100";
            case 5: return "11111000";
            default: return null;
            }        
          } else if (ch.equals("K")) {
            switch (row) {
            case 1: return "1100110";
            case 2: return "1101100";
            case 3: return "1111000";
            case 4: return "1101100";
            case 5: return "1100110";
            default: return null;
            }        
          } else if (ch.equals("L")) {
            switch (row) {
            case 1: return "1100000";
            case 2: return "1100000";
            case 3: return "1100000";
            case 4: return "1100000";
            case 5: return "1111110";
            default: return null;
            }        
          } else if (ch.equals("M")) {
            switch (row) {
            case 1: return "11000000110";
            case 2: return "11110011110";
            case 3: return "11011110110";
            case 4: return "11001100110";
            case 5: return "11000000110";
            default: return null;
            }        
          } else if (ch.equals("N")) {
            switch (row) {
            case 1: return "110000110";
            case 2: return "111100110";
            case 3: return "110110110";
            case 4: return "110011110";
            case 5: return "110001110";
            default: return null;
            }        
          } else if (ch.equals("O") || ch.equals("Ö")) {
            switch (row) {
            case 1: return "011111100";
            case 2: return "110000110";
            case 3: return "110000110";
            case 4: return "110000110";
            case 5: return "011111100";
            default: return null;
            }        
          } else if (ch.equals("P")) {
            switch (row) {
            case 1: return "11111100";
            case 2: return "11001100";
            case 3: return "11111100";
            case 4: return "11000000";
            case 5: return "11000000";
            default: return null;
            }        
          } else if (ch.equals("Q")) {
            switch (row) {
            case 1: return "011111100";
            case 2: return "110000110";
            case 3: return "110010110";
            case 4: return "110001110";
            case 5: return "011111010";
            default: return null;
            }        
          } else if (ch.equals("R")) {
            switch (row) {
            case 1: return "11111100";
            case 2: return "11000110";
            case 3: return "11111100";
            case 4: return "11011000";
            case 5: return "11001100";
            default: return null;
            }        
          } else if (ch.equals("S")) {
            switch (row) {
            case 1: return "00111100";
            case 2: return "01100000";
            case 3: return "01111110";
            case 4: return "00000110";
            case 5: return "11111100";
            default: return null;
            }        
          } else if (ch.equals("T")) {
            switch (row) {
            case 1: return "1111110";
            case 2: return "0011000";
            case 3: return "0011000";
            case 4: return "0011000";
            case 5: return "0011000";
            default: return null;
            }        
          } else if (ch.equals("U") || ch.equals("Ü")) {
            switch (row) {
            case 1: return "11000110";
            case 2: return "11000110";
            case 3: return "11000110";
            case 4: return "11000110";
            case 5: return "01111100";
            default: return null;
            }        
          } else if (ch.equals("V")) {
            switch (row) {
    
            case 1: return "11000110";
            case 2: return "11000110";
            case 3: return "11000110";
            case 4: return "01101100";
            case 5: return "00111000";
            default: return null;
            }        
          } else if (ch.equals("W")) {
            switch (row) {
            case 1: return "11000000110";
            case 2: return "01100001100";
            case 3: return "01101101100";
            case 4: return "01101101100";
            case 5: return "00111111000";
            default: return null;
            }        
          } else if (ch.equals("X")) {
            switch (row) {
            case 1: return "11000110";
            case 2: return "01101100";
            case 3: return "00111000";
            case 4: return "01101100";
            case 5: return "11000110";
            default: return null;
            }        
          } else if (ch.equals("Y")) {
            switch (row) {
            case 1: return "110000110";
            case 2: return "011001100";
            case 3: return "001111000";
            case 4: return "000110000";
            case 5: return "000110000";
            default: return null;
            }        
          } else if (ch.equals("Z")) {
            switch (row) {
            case 1: return "11111110";
            case 2: return "00001100";
            case 3: return "00111100";
            case 4: return "00110000";
            case 5: return "11111110";
            default: return null;
            }        
          } else if (ch.equals("0")) {
            switch (row) {
            case 1: return "011111100";
            case 2: return "111000110";
            case 3: return "110110110";
            case 4: return "110001110";
            case 5: return "011111100";
            default: return null;
            }  
          } else if (ch.equals("1")) {
            switch (row) {
            case 1: return "0011100";
            case 2: return "1111100";
            case 3: return "0001100";
            case 4: return "0001100";
            case 5: return "0011110";
            default: return null;
            }  
          } else if (ch.equals("2")) {
            switch (row) {
            case 1: return "01111100";
            case 2: return "11000110";
            case 3: return "00001100";
            case 4: return "00011000";
            case 5: return "01111110";
            default: return null;
            }  
          } else if (ch.equals("3")) {
            switch (row) {
            case 1: return "0111100";
            case 2: return "0000110";
            case 3: return "0011100";
            case 4: return "0000110";
            case 5: return "1111100";
            default: return null;
            }  
          } else if (ch.equals("4")) {
            switch (row) {
            case 1: return "00110000";
            case 2: return "01100000";
            case 3: return "11001100";
            case 4: return "11111110";
            case 5: return "00001100";
            default: return null;
            }  
          } else if (ch.equals("5")) {
            switch (row) {
            case 1: return "1111110";
            case 2: return "1100000";
            case 3: return "1111100";
            case 4: return "0000110";
            case 5: return "1111100";
            default: return null;
            }  
          } else if (ch.equals("6")) {
            switch (row) {
            case 1: return "1111110";
            case 2: return "0000110";
            case 3: return "0111110";
            case 4: return "1100110";
            case 5: return "0111100";
            default: return null;
            }  
          } else if (ch.equals("7")) {
            switch (row) {
            case 1: return "11111110";
            case 2: return "00001100";
            case 3: return "00111100";
            case 4: return "00110000";
            case 5: return "01100000";
            default: return null;
            }  
          } else if (ch.equals("8")) {
            switch (row) {
            case 1: return "001111000";
            case 2: return "011001100";
            case 3: return "001111000";
            case 4: return "110000110";
            case 5: return "011111100";
            default: return null;
            }  
          } else if (ch.equals("9")) {
            switch (row) {
            case 1: return "0111100";
            case 2: return "1100110";
            case 3: return "0111110";
            case 4: return "0000110";
            case 5: return "1111110";
            default: return null;
            }  
          } else if (ch.equals("-")) {
            switch (row) {
            case 1: return "0000000";
            case 2: return "0000000";
            case 3: return "1111110";
            case 4: return "0000000";
            case 5: return "0000000";
            default: return null;
            }  
          } else if (ch.equals("+")) {
            switch (row) {
            case 1: return "000110000";
            case 2: return "000110000";
            case 3: return "111111110";
            case 4: return "000110000";
            case 5: return "000110000";
            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 "0110";
            default: return null;
            }  
          } else if (ch.equals("(")) {
            switch (row) {
            case 1: return "0010";
            case 2: return "0100";
            case 3: return "1000";
            case 4: return "0100";
            case 5: return "0010";
            default: return null;
            }  
          } else if (ch.equals(")")) {
            switch (row) {
            case 1: return "1000";
            case 2: return "0100";
            case 3: return "0010";
            case 4: return "0100";
            case 5: return "1000";
            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";
            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 "111111110";
            default: return null;          
            }
            /*
            switch (row) {
            case 1: return "";
            case 2: return "";
            case 3: return "";
            case 4: return "";
            case 5: return "";
            default: return null;          
            }
            */
          }
    
        
      }
    }
    
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.