Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » Theide and LineEdit fix for Chinese font display.
Theide and LineEdit fix for Chinese font display. [message #21548] Tue, 26 May 2009 11:42 Go to next message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
Upp for linux have some Chinese Font display problem,Codeeditor can't display Chinese,even set to UTF8. As follow:
index.php?t=getfile&id=1745&private=0

LineEdit widget also have that problem. When font set to Chinese font,text style is sparse and ugly.I fixed it
  • Attachment: fixbefor.png
    (Size: 12.85KB, Downloaded 591 times)
Re: Theide and LineEdit fix for Chinese font display. [message #21549 is a reply to message #21548] Tue, 26 May 2009 11:45 Go to previous messageGo to next message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
Attachment is patch
  • Attachment: patch.zip
    (Size: 0.78KB, Downloaded 242 times)
Re: Theide and LineEdit fix for Chinese font display. [message #21550 is a reply to message #21549] Tue, 26 May 2009 11:47 Go to previous messageGo to next message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
For fixed display:
index.php?t=getfile&id=1747&private=0
  • Attachment: fixafter.png
    (Size: 20.93KB, Downloaded 551 times)
Re: Theide and LineEdit fix for Chinese font display. [message #21551 is a reply to message #21550] Tue, 26 May 2009 11:53 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
If you change the font to a font that has Chinese characters doesn’t that cause the Han characters to be rendered properly? I can see from your screenshot that you are under Linux.
Re: Theide and LineEdit fix for Chinese font display. [message #21552 is a reply to message #21551] Tue, 26 May 2009 12:05 Go to previous messageGo to next message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
cbpporter wrote on Tue, 26 May 2009 11:53

If you change the font to a font that has Chinese characters doesn’t that cause the Han characters to be rendered properly? I can see from your screenshot that you are under Linux.

I'm sorry,my english is very poor! I don't complete understand what you mean.When I set Lineedit to Chinese font,it can't render perfect.So I fix it.

LineEdit fix before,it like this:
index.php?t=getfile&id=1749&private=0
  • Attachment: changfont.png
    (Size: 18.29KB, Downloaded 509 times)

[Updated on: Tue, 26 May 2009 12:07]

Report message to a moderator

Re: Theide and LineEdit fix for Chinese font display. [message #21553 is a reply to message #21552] Tue, 26 May 2009 12:08 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
Could you give the names of the fonts you are experiencing problems with?
Re: Theide and LineEdit fix for Chinese font display. [message #21555 is a reply to message #21553] Tue, 26 May 2009 12:18 Go to previous messageGo to next message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
Now it's hasn't display problem. before fix, all non-FIXEDPITCH font can't perfect display. style is sparse and ugly.
Re: Theide and LineEdit fix for Chinese font display. [message #21630 is a reply to message #21555] Sat, 30 May 2009 09:00 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
gxl117 wrote on Tue, 26 May 2009 06:18

Now it's hasn't display problem. before fix, all non-FIXEDPITCH font can't perfect display. style is sparse and ugly.


Actually, before fix, only monospaced fonts (FIXEDPITCH) are allowed in LineEdit. Your fix basically seems to

- allow variable spaced fonts in CodeEditor
- if font is variable-spaced, use only half the width of average (perhaps quite OK if there is a lot of CJK ideograms in the font)

I am not sure this fix is correct, e.g. it will allow you to use "Arial" (in Win32) and then the result will be very bad...

I second the question:

Please, list the font

- you had problem with
- you are using now

As an alternative fix, maybe you could try:

 Size LineEdit::GetFontSize() const {
 	FontInfo fi = font.Info();
	return Size(max(fi['M'], fi['W']), fi.GetHeight());
 }


Mirek
Re: Theide and LineEdit fix for Chinese font display. [message #21634 is a reply to message #21630] Sat, 30 May 2009 10:21 Go to previous messageGo to next message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
Yes,I don't test that fix for Windows.actual even for ubuntu, when use LiHei Pro font,codeedit have problem yet.but most case it's OK.
fix before,codeedit can't display Chinese character.
if codeedit allow variable spaced fonts,all variable-spaced fonts is sparse and ugly. font list:
index.php?t=getfile&id=1760&private=0
and LiHei Pro font.
I now using highlighting font in above list;
you can install xfont-wqy and ttf-wqy-zhenhei to get them.but "ËÎÌå" font and LiHei pro font is my copy from Windows xp for Chinese version and Mac for Chinese version.
I don't know your system can display Chinese,So I use the picture to display the font list for you.
Re: Theide and LineEdit fix for Chinese font display. [message #21636 is a reply to message #21634] Sat, 30 May 2009 15:27 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Do I understand well that using my proposed patch fixed most of your problems?

Mirek
Re: Theide and LineEdit fix for Chinese font display. [message #21639 is a reply to message #21636] Sat, 30 May 2009 15:48 Go to previous messageGo to next message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
Yes,your patch is OK.But LiHei pro font still is sparse!
Re: Theide and LineEdit fix for Chinese font display. [message #21649 is a reply to message #21639] Sun, 31 May 2009 01:57 Go to previous messageGo to next message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
I see LineEdit is fixed in SVN,But ide setup don't fix yet.Codeedit still can't display Chinese font. Sad
Re: Theide and LineEdit fix for Chinese font display. [message #21659 is a reply to message #21649] Sun, 31 May 2009 13:50 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
It only gets rebuild in the night.
Re: Theide and LineEdit fix for Chinese font display. [message #21662 is a reply to message #21659] Sun, 31 May 2009 14:23 Go to previous messageGo to next message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
Thank your reply!
This bug,Have you any ideas?
http://www.ultimatepp.org/forum/index.php?t=msg&th=4423& amp;start=0&

I try fix it in the Assist.cpp,but that goes beyond my abilities.
Re: Theide and LineEdit fix for Chinese font display. [message #21667 is a reply to message #21662] Sun, 31 May 2009 17:05 Go to previous messageGo to next message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
I have noticed that you do not modify uppsrc/ide/Setup.cpp.So theide is still not be able to choose variable width fonts for display Chinese.
Re: Theide and LineEdit fix for Chinese font display. [message #21671 is a reply to message #21662] Sun, 31 May 2009 22:02 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
gxl117 wrote on Sun, 31 May 2009 08:23

Thank your reply!
This bug,Have you any ideas?
http://www.ultimatepp.org/forum/index.php?t=msg&th=4423& amp; amp;start=0&

I try fix it in the Assist.cpp,but that goes beyond my abilities.


Well, I am getting my nerves ready to deal with SCIM Smile I suppose it will be tough battle.

My guess is that fix has to be done in CtrlCore, not in Assist.cpp.

Mirek
Re: Theide and LineEdit fix for Chinese font display. [message #21672 is a reply to message #21667] Sun, 31 May 2009 22:02 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
gxl117 wrote on Sun, 31 May 2009 11:05

I have noticed that you do not modify uppsrc/ide/Setup.cpp.So theide is still not be able to choose variable width fonts for display Chinese.


But LineEdit is indeed only capable of dealing with fixed-width fonts...

Mirek
Re: Theide and LineEdit fix for Chinese font display. [message #21680 is a reply to message #21671] Mon, 01 June 2009 01:06 Go to previous messageGo to next message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
luzr wrote on Sun, 31 May 2009 22:02



Well, I am getting my nerves ready to deal with SCIM Smile I suppose it will be tough battle.

My guess is that fix has to be done in CtrlCore, not in Assist.cpp.

Mirek

Sad But this bug has nothing to do with SCIM.It is theide bug for itself. when use mouse select text,if codetip occur,mouse can't continue to select text.That bug is very easy to reproduce.
Re: Theide and LineEdit fix for Chinese font display. [message #21681 is a reply to message #21672] Mon, 01 June 2009 01:13 Go to previous messageGo to next message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
luzr wrote on Sun, 31 May 2009 22:02

gxl117 wrote on Sun, 31 May 2009 11:05

I have noticed that you do not modify uppsrc/ide/Setup.cpp.So theide is still not be able to choose variable width fonts for display Chinese.


But LineEdit is indeed only capable of dealing with fixed-width fonts...

Mirek

After fix Lineedit,it can display variable-width fonts.if theide can't set codeedit to use variable-width font,it will can not display any Chinese characters.Because that haven't fixed-width Chinese font for Linux Sad
I how to use chinese for upp?
Re: Theide and LineEdit fix for Chinese font display. [message #21691 is a reply to message #21681] Mon, 01 June 2009 08:48 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
gxl117 wrote on Sun, 31 May 2009 19:13

luzr wrote on Sun, 31 May 2009 22:02

gxl117 wrote on Sun, 31 May 2009 11:05

I have noticed that you do not modify uppsrc/ide/Setup.cpp.So theide is still not be able to choose variable width fonts for display Chinese.


But LineEdit is indeed only capable of dealing with fixed-width fonts...

Mirek

After fix Lineedit,it can display variable-width fonts.if theide can't set codeedit to use variable-width font,it will can not display any Chinese characters.Because that haven't fixed-width Chinese font for Linux Sad
I how to use chinese for upp?


OK, I guess we will have to do something with it....

Mirek
Previous Topic: Wrong alignment in 'select main package' window
Next Topic: big problems with autobuild 1240
Goto Forum:
  


Current Time: Fri Mar 29 00:16:09 CET 2024

Total time taken to generate the page: 0.02308 seconds