JBuilderx cursor positioning problem solution (reproduced)

xiaoxiao2021-03-06  71

The cursor problem in JBuilder is not a problem with Borland, but should be the trouble left by Sun. Everyone knows that I18N issues mainly through the operating system to work in the user and use language through LOCALE

(Window2000 or Control Panel on the Control Panel through "Regional and Language Options") to distinguish, so that developers use the corresponding area and language attribute files to support support for internationalization. Specifically, JBuilder implements support for Chinese fonts by using JRE's Font.Properties.en.

The problem is on the font.properties.en provided in Sun. Sun is used in the normal body, bold and slope of various fonts in this document. We know that in the editor, the width of the normal body and bold or obliquely occupied is different. Therefore, Bold and normal body (plain) uses normal experience that causes the editor to calculate errors on bold character width, which we understand the cause of the problem. Interestingly, Sun has the correct difference between the font attribute documents of English. (It seems to be deliberate ?!) Compare font.properties and font.properties.zh files, you can understand the problem.

======= CORRECT FONT SETTING =====

# Component Font Mappings

#

Dialog.Plain.0 = arial, ANSI_Charset

Dialog.Bold.0 = arial bold, ANSI_Charset

Dialog.italic.0 = arial italic, ANSI_Charset

As above, PLAIN should use font xxx, Bold should use XXX Bold, italic should use XXX Italic.

It is very easy to understand the roots of the problem. It is very easy to find a solution to the problem.

Replace the corresponding component font mappings in Font.Properties.en to the bottom.

# Component Font Mappings

#

Dialog.Plain.0 = arial, ANSI_Charset

Dialog.plain.1 = / U5B8B / U4F53, GB2312_CHARSET

Dialog.plain.2 = Wingdings, Symbol_Charset, NEED_CONVERTED

Dialog.plain.3 = Symbol, Symbol_Charset, NEED_CONVERTED

Dialog.Bold.0 = arial bold, ANSI_Charset

Dialog.Bold.1 = / U5B8B / U4F53, GB2312_CHARSET

Dialog.Bold.2 = WINGDINGS, SYMBOL_CHARSET, NEED_CONVERTED

Dialog.Bold.3 = Symbol, Symbol_Charset, NEED_CONVERTED

Dialog.italic.0 = arial italic, ANSI_Charset

Dialog.italic.1 = / u5b8b / u4f53, gb2312_charset

Dialog.italic.2 = Wingdings, Symbol_Charset, NEED_CONVERTED

Dialog.italic.3 = Symbol, Symbol_Charset, NEED_CONVERTED

Dialog.bolditalic.0 = arial bold italic, ANSI_CHARSET

Dialog.bolditalic.1 = / u5b8b / u4f53, gb2312_charsetdialog.bolditalic.2 = wingdings, symbol_charset, need_converted

Dialog.bolditalic.3 = Symbol, Symbol_Charset, NEED_CONVERTED

Dialoginput.Plain.0 = Courier New, ANSI_Charset

Dialoginput.Plain.1 = / u5b8b / u4f53, gb2312_charset

Dialoginput.Plain.2 = Wingdings, Symbol_Charset, NEED_CONVERTED

Dialoginput.plain.3 = Symbol, Symbol_Charset, NEED_CONVERTED

Dialoginput.Bold.0 = Courier New Bold, ANSI_CHARSET

Dialoginput.bold.1 = / u5b8b / u4f53, gb2312_charset

Dialoginput.Bold.2 = WINGDINGS, SYMBOL_CHARSET, NEED_CONVERTED

Dialoginput.bold.3 = Symbol, Symbol_Charset, NEED_CONVERTED

Dialoginput.italic.0 = Courier New Italic, ANSI_CHARSET

Dialoginput.italic.1 = / u5b8b / u4f53, gb2312_charset

Dialoginput.italic.2 = Wingdings, Symbol_Charset, NEED_CONVERTED

Dialoginput.italic.3 = Symbol, Symbol_Charset, NEED_CONVERTED

Dialoginput.Bolditalic.0 = Courier New Bold Italic, ANSI_CHARSET

Dialoginput.bolditalic.1 = / u5b8b / u4f53, gb2312_charset

Dialoginput.Bolditalic.2 = Wingdings, Symbol_Charset, NEED_CONVERTED

Dialoginput.bolditalic.3 = Symbol, Symbol_Charset, NEED_CONVERTED

Serif.plain.0 = Times New Roman, ANSI_CHARSET

Serif.Plain.1 = / U5B8B / U4F53, GB2312_CHARSET

Serif.Plain.2 = Wingdings, Symbol_Charset, NEED_CONVERTED

Serif.Plain.3 = Symbol, Symbol_Charset, NEED_CONVERTED

Serif.Bold.0 = Times New Roman Bold, ANSI_CHARSET

Serif.Bold.1 = / U5B8B / U4F53, GB2312_CHARSET

Serif.Bold.2 = WINGDINGS, SYMBOL_CHARSET, NEED_CONVERTED

Serif.Bold.3 = Symbol, Symbol_Charset, NEED_CONVERTED

Serif.italic.0 = Times New Roman Italic, ANSI_CHARSET

Serif.italic.1 = / U5B8B / U4F53, GB2312_CHARSET

Serif.italic.2 = WINGDINGS, SYMBOL_CHARSET, NEED_CONVERTED

Serif.italic.3 = Symbol, Symbol_Charset, Need_converedserif.bolditalic.0 = Times New Roman Bold Italic, ANSI_CHARSET

Serif.bolditalic.1 = / U5B8B / U4F53, GB2312_CHARSET

Serif.Bolditalic.2 = Wingdings, Symbol_Charset, NEED_CONVERTED

Serif.bolditalic.3 = Symbol, Symbol_Charset, NEED_CONVERTED

Sansserif.plin.0 = arial, ANSI_CHARSET

Sansserif.plain.1 = / U5B8B / U4F53, GB2312_CHARSET

Sansserif.Plain.2 = WINGDINGS, SYMBOL_CHARSET, NEED_CONVERTED

Sansserif.Plain.3 = Symbol, Symbol_Charset, NEED_CONVERTED

Sansserif.bold.0 = arial bold, ANSI_Charset

Sansserif.Bold.1 = / U5B8B / U4F53, GB2312_CHARSET

Sansserif.Bold.2 = Wingdings, Symbol_Charset, NEED_CONVERTED

Sansserif.Bold.3 = Symbol, Symbol_Charset, NEED_CONVERTED

Sansserif.italic.0 = arial italic, ANSI_CHARSET

Sansserif.italic.1 = / U5B8B / U4F53, GB2312_CHARSET

Sansserif.italic.2 = Wingdings, Symbol_Charset, NEED_CONVERTED

Sansserif.italic.3 = Symbol, Symbol_Charset, NEED_CONVERTED

Sansserif.bolditalic.0 = arial bold italic, ANSI_CHARSET

Sansserif.bolditalic.1 = / U5B8B / U4F53, GB2312_CHARSET

Sansserif.Bolditalic.2 = Wingdings, Symbol_Charset, NEED_CONVERTED

Sansserif.Bolditalic.3 = Symbol, Symbol_Charset, NEED_CONVERTED

Monospaced.Plain.0 = Courier New, GB2312_Charset

Monospaced.Plain.1 = / u5b8b / u4f53, gb2312_charset

Monospaced.Plain.2 = WINGDINGS, SYMBOL_CHARSET, NEED_CONVERTED

Monospaced.Plain.3 = Symbol, Symbol_Charset, NEED_CONVERTED

Monospaced.Bold.0 = Courier New Bold, GB2312_CHARSET

Monospaced.bold.1 = / u5b8b / u4f53, gb2312_charset

Monospaced.bold.2 = Wingdings, Symbol_Charset, NEED_CONVERTED

Monospaced.Bold.3 = Symbol, Symbol_Charset, NEED_CONVERTED

Monospaced.italic.0 = Courier New Italic, GB2312_CHARSET

Monospaced.italic.1 = / u5b8b / u4f53, gb2312_charsetmonospaced.italic.2 = Wingdings, Symbol_Charset, NEED_CONVERTED

Monospaced.italic.3 = Symbol, Symbol_Charset, NEED_CONVERTED

Monospaced.Bolditalic.0 = Courier New Bold Italic, GB2312_Charset

Monospaced.bolditalic.1 = / u5b8b / u4f53, gb2312_charset

Monospaced.bolditalic.2 = Wingdings, Symbol_Charset, NEED_CONVERTED

Monospaced.bolditalic.3 = Symbol, Symbol_Charset, NEED_CONVERTED

==== End =====

Restart JBuilder, you can! Finally, I hope that you will also make the same modifications in the JDK in JDK and JBuilders in JBuilder. Font.properties.en files in the {jdk_home} / jre / lib directory.

转载请注明原文地址:https://www.9cbs.com/read-120591.html

New Post(0)