Hello,
I am trying to print some Tamil characters but does work though Hindi
characters are being printed. I have fonts for both the languages.
Plus I just want to know how java picks up the fonts, does it have its
own fonts. Below is the program I have written.
import javax.swing.*;
public class UnicodeTest extends JFrame
{
private String str;
private JTextField text=null;
public UnicodeTest()
{
//str="\u0932\u0947\u0915\u0930"; // Hindi works
str="\u0B85\u0B87\u0B88"; // Tamil does not work
text=new JTextField(10);
add(text);
setSize(100,100);
setVisible(true);
}
public static void main(String[] args)
{
UnicodeTest obj=new UnicodeTest();
obj.print();
}
private void print()
{
text.setText(str);
}
}
regards,
vijay.
Roland - 29 Apr 2005 10:24 GMT
> Hello,
>
[quoted text clipped - 3 lines]
> Plus I just want to know how java picks up the fonts, does it have its
> own fonts. Below is the program I have written.
[snip]
> regards,
> vijay.
Apparently the Java font used for the JTextField does not have glyphs
for the Tamil characters (but is has for Hindi chars).
Try so set the font of the textfield to a font for which you know it has
glyphs for Tamil chars.
For info on how Java deals with fonts, see "Fonts" section of
<http://java.sun.com/j2se/1.5.0/docs/guide/intl/index.html>

Signature
Regards,
Roland de Ruiter
___ ___
/__/ w_/ /__/
/ \ /_/ / \