Unicode beyond FFFF
How to display Unicode sets beyond FFFF, such as Gothic or Old Italic?
I tried the code below, but it just doesn't work, even though the font "Code2001" (downloaded from http://home.att.net/~jameskass/code2001.htm) works well in browsers.
My poor Java:
import java.awt.*;
import javax.swing.*;
class UnicodeFonts
{
JFrame frame;
JLabel label;
JButton button;
Font font;
Container contentPane;
publicstaticvoid main(String[] args)
{
new UnicodeFonts();
}
UnicodeFonts()
{
String sUnicode="";
int codePoints;
label=new JLabel("default label");
button=new JButton("default button");
int start=0;
int tamil=0x0b80;
int oldItalic=0x10300;
int devanagari=2304;
start=devanagari;
for(int i=0;i<16;i++)
{
for(int j=0;j<16;j++)
{
codePoints= j + i*16 + start;
sUnicode=sUnicode+(char)codePoints;
}
}
font=new Font("Courier", Font.PLAIN, 16);
label.setFont(font);
label.setText(sUnicode);
sUnicode="";
start=oldItalic;
for(int i=0;i<16;i++)
{
for(int j=0;j<16;j++)
{
codePoints= j + i*16 + start;
sUnicode=sUnicode+(char)codePoints;
}
}
//downloaded from http://home.att.net/~jameskass/code2001.htm
font=new Font("Code2001", Font.PLAIN, 26);
button.setFont(font);
button.setText(sUnicode);
frame=new JFrame("UnicodeFonts");
frame.setSize(600,400);
contentPane=frame.getContentPane();
contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.PAGE_AXIS));
contentPane.add(label);
contentPane.add(button);
frame.setVisible(true);
}
}
My lucky HTML:
<!DOCTYPE html PUBLIC'-//W3C//DTD XHTML 1.0 Transitional//EN''http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xml:lang='en' lang='en' xmlns='http://www.w3.org/1999/xhtml'><head>
<meta http-equiv='content-type' content='text/html;charset=x-user-defined'/>
<title>Etruscan</title>
</head>
<body style='font-family:"Code2001","Etruscan Epigraphic", "Etruscan", "Etruscan mid/late Bold";'>
𐌀 𐌁 𐌂 𐌃 𐌄 𐌅 𐌆 𐌇 𐌈 𐌉 𐌊 𐌋 𐌌 𐌍 𐌎 𐌏 𐌐 𐌑 𐌒 𐌓
𐌔 𐌕 𐌖 𐌗 𐌘 𐌙 𐌚 𐌛 𐌜 𐌝 𐌞 𐌟 𐌠 𐌡 𐌢 𐌣 𐌤 𐌥 𐌦 𐌧
𐌨 𐌩 𐌪 𐌫 𐌬 𐌭 𐌮 𐌯
</body>
</html>

