LEDSign V3.1 中文字型相容版修正方法
本修正方法係參考Jyh-Shin Shue修正LEDSign V2.7之方式修改之
Index.java
******
{
public byte ch;
public int width;
修改成下面三行:
{
public char ch;
public char ch_low;
public int width;
******
Index(byte b, int w, int h)
{
修改成下面兩行:
Index(char b,char l,int w, int h)
{
******
ch = b;
}
修改成下面三行:
ch = b;
ch_low = l;
}
******
LEDMessage.java
******
{
len += (let.getLetter(fi.text.charAt(i))).width+1;
}
修改成下面八行:
{
if ( fi.text.charAt(i) >= (char)128){
len += (let.getLetter(fi.text.charAt(i),fi.text.charAt(i+1))).width+1;
i++;
} else{
len += (let.getLetter(fi.text.charAt(i),fi.text.charAt(i))).width+1;
}
}
******
// get letter i in fi.text in LED format
index = let.getLetter(fi.text.charAt(i));
修改成下面七行:
// get letter i in fi.text in LED format
if ( fi.text.charAt(i) >= (char) 128) {
index = let.getLetter(fi.text.charAt(i),fi.text.charAt(i+1));
i++;
} else{
index = let.getLetter(fi.text.charAt(i),fi.text.charAt(i));
}
******
Letters.java
******
int a,b,c;
byte ch; // the character of the letter
int i,j,k;
修改成下面三行:
int a,b,c;
char ch,ch_low; // the character of the letter
int i,j,k;
******
ch = 2;
width = 10;
修改成下面三行:
ch = 2;
ch_low = 2;
width = 10;
******
{
ch = (byte)s.charAt(0);
done = true;
修改成下面五行:
{
ch = s.charAt(0);
if ( ch >= (char) 128 ) ch_low = s.charAt(1);
else ch_low = ch;
done = true;
******
// initialize the struct
index[i] = new Index(ch,width,h);
修改成下面兩行:
// initialize the struct
index[i] = new Index(ch,ch_low,width,h);
******
{
if(s.charAt(k) == '#')
index[i].letter[k][j] = true;
修改成下面三行:
{
if(s.charAt(k) != ' ')
index[i].letter[k][j] = true;
******
index[num] = new Index((byte)32,swidth,h);
修改成下面一行:
index[num] = new Index((char)32,(char)32,swidth,h);
******
// find the LED letter and return it
public Index getLetter(char c)
{
修改成下面三行:
// find the LED letter and return it
public Index getLetter(char c,char c_low)
{
******
j = 0;
while(c != index[j].ch && j < num)
j++;
修改成下面三行:
j = 0;
while( (c != index[j].ch|| c_low != index[j].ch_low) && j < num)
j++;
******
Script.java
******
b = 0;
while(b < tmp.length())
{
if(tmp.charAt(b) == '\\') // if there is a '\' does the following
修改成下面十一行:
b = 0;
orig: while(b < tmp.length())
{
if ( tmp.charAt(b) >= (char)128) {
fi.color = fi.color.concat(new Character(c).toString());
b++;
fi.color = fi.color.concat(new Character(c).toString());
b++;
continue orig;
}
if(tmp.charAt(b) == '\\') // if there is a '\' does the following
******
lED.java
linkList.java
FuncInfo.java
******
以上三個檔案不須修改即可
修改完上面幾個檔案後, 只要執行javac *.java即可編譯出需要的*.class檔案
再利用WinZIP將這些*.class壓成com.dc3.applet.LEDSign.zip檔即可
至於LEDSign.*這些檔案似乎都不需要修改即可!
From chungwen@ms1.hinet.net (1/1/1997)
               (
geocities.com/tokyo/5763)                   (
geocities.com/tokyo)