Results 1 to 4 of 4
Thread: Incorrect Bengali font rendering
- 10-17-2010, 07:35 PM #1
Member
- Join Date
- Oct 2010
- Posts
- 2
- Rep Power
- 0
Incorrect Bengali font rendering
I have created a simple Hello World swing application, which just displays a label with unicode string.
The English and Hindi part is displayed correctly, while the Bengali part is not displayed correctly (boxes are seen in place of the expected text). See attached file which shows the rendered text...Java Code:JLabel label = new JLabel("Hello नमस्ते বাংলা");
If I System.out.println the text, it get printed properly in my Eclipse console window.
Any hints as to why Bengali text is not getting rendered properly?
Thanks
- 10-24-2010, 06:46 PM #2
Member
- Join Date
- Sep 2010
- Posts
- 33
- Rep Power
- 0
This means in the logical font "Dialog" are no Bengali characters. Which real font is use for the different characters are define in the fontconfig.properties of the Java VM.
You have 2 options:
You modify the fontconfig.properties and add a range for Bengali characters. This can e a little tricky.
Or you set font for you label that can show Bengali characters. The problem can be that you show some of the other characters wrong. There does not exist a font that include all characters. That there are the logical (composite) fonts that mix multiple real font to one font.Volker Berlin
www.inetsoftware.de
- 10-24-2010, 07:15 PM #3
Member
- Join Date
- Oct 2010
- Posts
- 2
- Rep Power
- 0
Thanks for the reply!
I explicitly set a font having Bengali characters. Now the Bengali characters are displayed properly, but other characters display boxes. This solves my issue for the time being though.
I was wondering why Bengali (the issue is also observed for Oriya) characters are not displayed properly, while Devanagari ones are shown without problems. In this age of multi-language computing, things should work out of the box. Is this a bug that needs to be reported to the Java developers?
- 10-24-2010, 07:35 PM #4
Member
- Join Date
- Sep 2010
- Posts
- 33
- Rep Power
- 0
You can post it to Oracle. But I worry your language is not important enough. The same problem has also some European languages like Georgian which not use Latin characters.
The core question is: Has your OS (Windows?) a default font for your language or must install it self. The file fontconfig.properties is a static file. That it used only default fonts from the different OS.Volker Berlin
www.inetsoftware.de
Similar Threads
-
Set Font Color, Font Style & Font Family While Replacing Text
By sherazam in forum Java SoftwareReplies: 0Last Post: 08-18-2010, 10:31 AM -
What in my function incorrect?
By artemff in forum New To JavaReplies: 5Last Post: 01-02-2010, 04:25 PM -
How to change font/ font color etc in a graphic object using JCombobox?
By JavaInLove in forum AWT / SwingReplies: 5Last Post: 04-25-2009, 08:00 PM -
Incorrect Package? Help!
By chaits86 in forum NetBeansReplies: 10Last Post: 12-17-2008, 03:08 AM -
The addition program is providing incorrect sum '0'
By tabrez_k81 in forum New To JavaReplies: 4Last Post: 12-16-2008, 01:43 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks