| |

VerySource

 Forgot password?
 Register
Search
View: 750|Reply: 5

GUI programming, the title bar can be displayed in Chinese, and the menu bar in Chinese is a block. How to solve it? (Ub

[Copy link]

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-15 21:20:01
| Show all posts |Read mode
I am a beginner in Java and a beginner in Linux. I practice programming today. I write in VIM and compile in JDK under Ubuntu Linux. The window is fine, but the Chinese in the menu bar is all displayed as squares (the title bar can be displayed normally). Searching on google has no solution, so ask questions here, may I have any solution. Thank you.
Reply

Use magic Report

0

Threads

9

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-19 18:00:02
| Show all posts
The character set problem is not familiar with Ubuntu Linux, you first look at its encoding type, and then do the transcoding.
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-1-22 12:45:02
| Show all posts
Not too understanding, but I try to understand.
Friends who want to understand explain it in detail. Or familiar heroes point out.
thank you very much!
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-23 01:45:01
| Show all posts
Is your Chinese character set not installed on Linux?
Reply

Use magic Report

0

Threads

9

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-25 15:27:01
| Show all posts
Look at the constructor of String, I generally use that transcoding
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-2-6 13:15:01
| Show all posts
solved. The method is: If you have a Chinese font file, assuming you are fireflysung.ttf, then you copy directly to $ JAVA_HOME / jre / lib / fonts, and then backup the fonts.dir in the changed directory just in case And then, open it,
Change it to:
48
fireflysung.ttf -b&h-lucidabright-medium-r-normal--0-0-0-0-p-0-iso8859-1
fireflysung.ttf -b&h-lucidabright-medium-i-normal--0-0-0-0-p-0-iso8859-1
fireflysung.ttf -b&h-lucidabright-demibold-r-normal--0-0-0-0-p-0-iso8859-1
fireflysung.ttf -b&h-lucidabright-demibold-i-normal--0-0-0-0-p-0-iso8859-1
fireflysung.ttf -b&h-lucidasans-medium-r-normal-sans-0-0-0-0-p-0-iso8859-1
...
...
No matter how he maps outside, I use the font file fireflysung.ttf, so that this font is also used in English.
Thank you two heroes for pointing.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list