cancel
Showing results for 
Search instead for 
Did you mean: 

Encounter a language support problem

kevinwong
Champ in-the-making
Champ in-the-making
Hi, I post a topic in Activiti Explore board http://forums.activiti.org/en/viewtopic.php?f=9&t=2642

but I think I'd better repost here ,maybe it's an engine issue, give me a hand , thanks.

PS:my os is win7 and local is CN, jdk 1.6 u27 x64
15 REPLIES 15

trademak
Star Contributor
Star Contributor
Is the "Microsoft YaHei" font supported on every JRE on every platform?

Best regards,

kevinwong
Champ in-the-making
Champ in-the-making
I test this on ubuntu 11.10, win7x64 sp1, aix ,jdk are 1.5 or higher it works ,but i suggest we should make it a config item or a runtime parameter.it will be more flexable  Smiley Very Happy
At least , if we hard code Yahe ihere , and Yahe is not support by the platform, it will replace by the default font,and mostly it will be the local font that support Chinese or other non english language.
Anyway, i suggest it should be a runtime parameter with default value Microsoft Yahei.Thanks

thilo_ginkel
Champ in-the-making
Champ in-the-making
Is the "Microsoft YaHei" font supported on every JRE on every platform?
Nope. It does not exist on a standard Ubuntu 11.10 installation. Apart from that it is probably designed to render Chinese symbols best, which typically means that Latin characters have a kind of weird (fixed-width) appearance that most western readers are not used to.

kevinwong
Champ in-the-making
Champ in-the-making
Is the "Microsoft YaHei" font supported on every JRE on every platform?
Nope. It does not exist on a standard Ubuntu 11.10 installation. Apart from that it is probably designed to render Chinese symbols best, which typically means that Latin characters have a kind of weird (fixed-width) appearance that most western readers are not used to.

Hi,here is the description of yahei font http://en.wikipedia.org/wiki/Microsoft_YaHei

and the screenshot for English and Chinese preview, win7cn default font is ms yahei. So do you still think the  Latin characters have a weird appearance?   Anyway, jdk will use the system default font to render the characters if the font we specify cannot be found ,the problem here is ,"Arial" could be found(mostly, all platform have this font) , and it doesn't support non-english language. At least, don't use "Arial" here, use Arial Unicode version, it supports a lot of non-english languages.Thanks.

ahtya
Champ in-the-making
Champ in-the-making
My solution is replace "Arial" with Font.SANS_SERIF.
Original :
    Font font = new Font("Arial", Font.BOLD, 11);My solution :
    Font font = new Font(Font.SANS_SERIF, Font.BOLD, 12);I think it can work with JRE 1.6 on every platform.

http://docs.oracle.com/javase/6/docs/api/java/awt/Font.html#SANS_SERIF

pgadecki
Champ in-the-making
Champ in-the-making
Hi, I have provided a solution for this issue - the possibility of defining custom or extending existing ProcessDiagramGenerator. Discussion is here.
Patch for this issue is ready, I'm waiting until my boss lets me to become an Activiti contributor.