Topic: JBuilder光标定位不准的原因

  Print this page

1.JBuilder光标定位不准的原因 Copy to clipboard
Posted by: 阿熊
Posted on: 2003-09-24 08:45

问:
I test the JB editor in any jb version,including 6/7/8/9,I find the
cursor in editor has incorrect position when i set the editor font to the
Simplied Chinese fonts and set the font bold,but use default font is fine.
So,I want to know if it is a bug of the JB editor,and we hope the
developer could make it good.

Borland技术员的回答:

Actually, it is not a bug of JBuilder editor, but you can even
reproduce it under Simplified Chinese locale when you set the font
to bold for the swing JTextField (jdk1.4.2) like following.
> jTextField1.setFont(new java.awt.Font("Dialog", Font.BOLD, 24));

I believe it will be fixed on jdk1.5.
Thank you for the report

2.Re:JBuilder光标定位不准的原因 [Re: zua] Copy to clipboard
Posted by: helloworld
Posted on: 2003-09-24 08:51

意思是: 不是jbuilder的BUG,而是jdk的BUG ?

3.Re:JBuilder光标定位不准的原因 [Re: zua] Copy to clipboard
Posted by: 阿熊
Posted on: 2003-09-24 08:55

是这个意思
只能从jdk解决了
做补丁了

4.Re:JBuilder光标定位不准的原因 [Re: zua] Copy to clipboard
Posted by: scottding
Posted on: 2003-09-24 09:14

恩,,我曾经也在newsgroup上询问过这个问题,确实不是JB的Bug,想想看,难道Borland的工程师这么笨么,每一版本都存在这个问题。

5.Re:JBuilder光标定位不准的原因 [Re: zua] Copy to clipboard
Posted by: juweiping
Posted on: 2003-09-24 09:44

不是他们笨,而是他们不重视国际化,否则的话,自己早就打上补丁了,这一点就不如IDEA与NetBeans了。

6.Re:JBuilder光标定位不准的原因 [Re: zua] Copy to clipboard
Posted by: juweiping
Posted on: 2003-09-25 08:51

Hi juweiping,
The bug is reported, since we can reproduce it on JBuilder with
your jdk fix.
Thank you for your help,
-- Atsushi

juweiping wrote:
>
> Hi,
> Sorry, I have some question about the problem.
> After I fixed the JDK bug below(please see my attachment,included the
> fixed javax.swing.text.Utilities source file):
> http://developer.java.sun.com/developer/bugParade/bugs/4884991.html
> http://developer.java.sun.com/developer/bugParade/bugs/4841188.html
> The result can be test by the attachments
> file(org.cjsdn..util.sun.text.test.TestBugCase ) after you replace the file
> in JRE rt.jar file.
>
> But the JBuilder have the problem also,I think jb may be use itself
> Utilities(may be TextUtilities) class,but may be not only it,
> because I try fixed the TextUtilities,but the problem has exist.
>
> So,I think the problem may be not only the JDK bug or has some JB's other
> class cause it.
>
> Thanks.

7.Re:JBuilder光标定位不准的原因 [Re: zua] Copy to clipboard
Posted by: guru
Posted on: 2003-09-25 15:17

JDK的bug, 没有在font.properties.zh 文件中的字体映射中加入该加入的Bold, Italic等标记。

比如对于dialog的Bold字体,JDK的原始文件中是:

dialog.bold.0=Arial,ANSI_CHARSET
dialog.bold.1=\u5b8b\u4f53,GB2312_CHARSET
dialog.bold.2=WingDings,SYMBOL_CHARSET
dialog.bold.3=Symbol,SYMBOL_CHARSET

修改后为:

dialog.bold.0=Arial Bold,ANSI_CHARSET
dialog.bold.1=\u5b8b\u4f53,GB2312_CHARSET
dialog.bold.2=WingDings,SYMBOL_CHARSET
dialog.bold.3=Symbol,SYMBOL_CHARSET

对类似的字体都加入Bold, Italic就可以了。

8.Re:JBuilder光标定位不准的原因 [Re: zua] Copy to clipboard
Posted by: guru
Posted on: 2003-09-25 15:56

不止是Jbuilder有这个Bug,很多的程序都有这个问题。

9.Re:JBuilder光标定位不准的原因 [Re: guru] Copy to clipboard
Posted by: juweiping
Posted on: 2003-09-25 17:33

guru wrote:
JDK的bug, 没有在font.properties.zh 文件中的字体映射中加入该加入的Bold, Italic等标记。

比如对于dialog的Bold字体,JDK的原始文件中是:

dialog.bold.0=Arial,ANSI_CHARSET
dialog.bold.1=\u5b8b\u4f53,GB2312_CHARSET
dialog.bold.2=WingDings,SYMBOL_CHARSET
dialog.bold.3=Symbol,SYMBOL_CHARSET

修改后为:

dialog.bold.0=Arial Bold,ANSI_CHARSET
dialog.bold.1=\u5b8b\u4f53,GB2312_CHARSET
dialog.bold.2=WingDings,SYMBOL_CHARSET
dialog.bold.3=Symbol,SYMBOL_CHARSET

对类似的字体都加入Bold, Italic就可以了。

我试过,怎么不好使?
况且我看过人家IDEA,NetBean也没改这个文件怎么也可以正常显示中文粗题.

10.Re:JBuilder光标定位不准的原因 [Re: juweiping] Copy to clipboard
Posted by: guru
Posted on: 2003-09-25 17:56

juweiping wrote:
我试过,怎么不好使?
况且我看过人家IDEA,NetBean也没改这个文件怎么也可以正常显示中文粗题.


因为很多程序使用的是自己安装程序中带的JRE,所以没有成功的原因很可能是因为你的程序使用的JRE没有的到修正。比如,Jbuilder 的JRE就是使用的在JBuilder目录下JDK1.4中的那个JRE,光改JDK_HOME中的font.properties.zh是没有用的,需要改JBuilder目录下那个JDK1.4中的JRE。我的JBuilder正是这么改的,一点问题都没有。

另外,IDEA调整字体的时候好像也会出现问题,只不过IDEA的字体缺省没有设置粗体罢了。NebBean没试过。

11.Re:JBuilder光标定位不准的原因 [Re: guru] Copy to clipboard
Posted by: juweiping
Posted on: 2003-09-25 19:28

guru wrote:
因为很多程序使用的是自己安装程序中带的JRE,所以没有成功的原因很可能是因为你的程序使用的JRE没有的到修正。比如,Jbuilder 的JRE就是使用的在JBuilder目录下JDK1.4中的那个JRE,光改JDK_HOME中的font.properties.zh是没有用的,需要改JBuilder目录下那个JDK1.4中的JRE。我的JBuilder正是这么改的,一点问题都没有。

这个我当然不会去改JDK_HOME中的font.properties.zh.

我这的确有这个问题,我把Editor display字体设成宋体,把关键字设成粗体。如果你确认你那没问题,请发一份font.properties.zh,我看看到底是不是这个问题,因为我相信Sun不会犯这种低级错误。

12.Re:JBuilder光标定位不准的原因 [Re: juweiping] Copy to clipboard
Posted by: guru
Posted on: 2003-09-25 22:20

在我的配置中,我使用DialogInput作为编辑器的字体。宋体由于不是JDK内设的字体类型,所以可能不能够正确处理。

另外,在附件的font.properties.zh中,我用Tahoma替换了Arial以获得更好的显示效果。

font.properties.zh (7.45k)

13.Re:JBuilder光标定位不准的原因 [Re: zua] Copy to clipboard
Posted by: guru
Posted on: 2003-09-25 22:27

显示效果

14.Re:JBuilder光标定位不准的原因 [Re: zua] Copy to clipboard
Posted by: pts
Posted on: 2003-09-26 01:36

修改tools-editer属性-font-取消”黑体“选择框

15.Re:JBuilder光标定位不准的原因 [Re: zua] Copy to clipboard
Posted by: ajinjin
Posted on: 2003-09-26 09:00

pts说得对

16.Re:JBuilder光标定位不准的原因 [Re: pts] Copy to clipboard
Posted by: juweiping
Posted on: 2003-09-26 09:36

pts wrote:
修改tools-editer属性-font-取消”黑体“选择框

哪里有黑体,是Bold吧。
此外,我们讨论的不是这个问题,去掉Bold就没问题,大家早就知道了。

17.Re:JBuilder光标定位不准的原因 [Re: guru] Copy to clipboard
Posted by: juweiping
Posted on: 2003-09-26 09:39

guru wrote:
在我的配置中,我使用DialogInput作为编辑器的字体。宋体由于不是JDK内设的字体类型,所以可能不能够正确处理。

另外,在附件的font.properties.zh中,我用Tahoma替换了Arial以获得更好的显示效果。

我们要的是宋体。
此外,Jb10已经没这个问题了,即没修改这个文件,也没修改JDK bug.只需要修改启动参数。但以前的版本仍然有这个问题。

18.Re:JBuilder光标定位不准的原因 [Re: zua] Copy to clipboard
Posted by: collins
Posted on: 2003-09-26 09:58

如果是JDK的问题,那么eclips怎么没有问题?

19.Re:JBuilder光标定位不准的原因 [Re: juweiping] Copy to clipboard
Posted by: wes109
Posted on: 2003-09-26 10:56

juweiping wrote:
我们要的是宋体。
此外,Jb10已经没这个问题了,即没修改这个文件,也没修改JDK bug.只需要修改启动参数。但以前的版本仍然有这个问题。


JB10 ??
哪里有??

20.Re:JBuilder光标定位不准的原因 [Re: zua] Copy to clipboard
Posted by: joysun
Posted on: 2003-09-26 11:02

把代码编辑的默认字体改掉就没事了!

21.Re:JBuilder光标定位不准的原因 [Re: zua] Copy to clipboard
Posted by: joysun
Posted on: 2003-09-26 11:06

换一种感觉用Oracle JDeveloper 10g 演示版下载http://download.oracle.com/otn/java/jdeveloper/10g/jdev905preview.zip

22.Re:JBuilder光标定位不准的原因 [Re: zua] Copy to clipboard
Posted by: joysun
Posted on: 2003-09-26 11:07

是一个150MB的绿色软件,下载解压后,运行文件[解压目录]\JDEV\bin\jdevw.exe,就可以进行开发了。不用先安装JDK及配置即可开发调试等操作。 是JDK1.4内核

23.Re:JBuilder光标定位不准的原因 [Re: zua] Copy to clipboard
Posted by: pts
Posted on: 2003-09-26 23:42

我用jb9,输入中文没问题呀
oracle 的jb我一直感觉不好,不知10版本怎么样

24.Re:JBuilder光标定位不准的原因 [Re: juweiping] Copy to clipboard
Posted by: allblue
Posted on: 2003-11-21 11:00

juweiping wrote:
我们要的是宋体。
此外,Jb10已经没这个问题了,即没修改这个文件,也没修改JDK bug.只需要修改启动参数。但以前的版本仍然有这个问题。


加什么参数?


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923