Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.1-beta1-SNAPSHOT can't display chinese charset #73

Open
LS666 opened this issue Jun 10, 2016 · 13 comments
Open

3.1-beta1-SNAPSHOT can't display chinese charset #73

LS666 opened this issue Jun 10, 2016 · 13 comments

Comments

@LS666
Copy link

LS666 commented Jun 10, 2016

http://chuantu.biz/t5/7/1465529422x1035372876.png

@grizeldi
Copy link
Member

Pretty sure that's abug in Netbeans not in jme sdk. Can netbeans display them correctly?
@MeFisto94 do we use a custom font that doesn't support "exotic" letters?

@MeFisto94
Copy link
Member

Does it work with 3.1-alpha1 for example?
Or when you change the Look and Feel in the Settings to "Platform Default, Metal, ..." or something?

DarkMonkey uses DejaVu Sans Condensed-PLAIN-12so this could be, yep.

@Jackeriss
Copy link

Jackeriss commented Jun 14, 2016

@MeFisto94 I went into the same problem, it happens only when you use the Dark Monkey theme, but won't happen when you use other themes.

@MeFisto94
Copy link
Member

http://dejavu-fonts.org/wiki/Main_Page and http://stackoverflow.com/a/18065154/6470939 show that.
There is no support for those characters for these fonts.

So we could now either update the SDK to use a default font (Arial?) or comparable but we shouldn't use Font XYZ because one always has to think about license implications

@jmecn
Copy link

jmecn commented Jun 23, 2016

I have the same problem, and even I changed DarkMonkey theme to NetBeans default theme it still can't display properly.

@youmingfl
Copy link

youmingfl commented Apr 20, 2017

@MeFisto94 Hi,the messy code didn't happened in code editor. It happened in menu ,toolbox and many other JME IDE's GUI. I haven't write anything. I have tried to change the theme, but it didn't work.
001

@MeFisto94
Copy link
Member

Yeah, you can see on the right that the code is another font.
It is strange that changing the theme did not help, since pure netbeans works correctly, right?
Have you restarted the sdk after changing the theme?

@ModuleCode
Copy link

I hope the government can solve this BUG earlier.

@wupei93
Copy link

wupei93 commented Apr 30, 2019

@MeFisto94 Hi,the messy code didn't happened in code editor. It happened in menu ,toolbox and many other JME IDE's GUI. I haven't write anything. I have tried to change the theme, but it didn't work.
001

你改错地方了,你那里改的是编辑框主题,应该改外观主题
20190430162740

@hangingman
Copy link

DarkMonkeyLookAndFeel.java forces swing window to use font as "DejaVu Sans Condensed-PLAIN-12".
This causes menu displays what's called "tofu" (small boxes are shown to represent the characters because of there are no characters in the text that cannot be displayed).

nt.setFont(Font.decode("DejaVu Sans Condensed-PLAIN-12"));

It's better to have fallback font ( it means , if there is no font, jme use system default font ). It's easily accomplished with checking font existence.

I can create a PR, but I can't build current JMonkey SDK master source. ( because of #231 ? )

@MeFisto94
Copy link
Member

Are you sure that the Font is not present? I think the Font is present but it just cannot display the characters, in which case we'd need a check to see whether the font supports that language or not.
Either way if you come up with a solution that works, a PR is more than welcome.

@hangingman
Copy link

@MeFisto94

Are you sure that the Font is not present? I think the Font is present but it just cannot display the characters,

Yes, you're right. I misunderstood the point.

in which case we'd need a check to see whether the font supports that language or not.

I found a API, java.awt.Font#canDisplay.
I'll try it.

@hangingman
Copy link

@MeFisto94 I created PR, would you please check it ?
I simply apply DejaVu font if user locale is not CJK.
#281

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants