Font settings for graphic tools such as the IBM DB2 control center in Windows

Source: Internet
Author: User
Tags ibm db2 intl
Font settings for graphic tools such as the IBM DB2 control center in Windows

Source: http://loveseaside.iteye.com/blog/648941

This article describes how to display the IBM DB2 Java-based graphical tool and how to set the font for display in Windows.

<! -- Start reserved for future use include files --> <! -- Include java script once we verify teams wants to use this and it will work on dbcs and cyrillic characters --> <! -- End reserved for future use include files -->

Background

IBM DB2 8.0 and above provide a cross-platform Java-based graphical tool to help manage and maintain the DB2 database, greatly simplifying the operation difficulty of many users who just learned about DB2, this avoids the trouble of remembering many complex operation commands and parameters. Even many senior DB2 users can use the wizard in graphic tools to generate SQL statements and scripts for various complex operations. However, in many cases, the font display of many Java-based software is not clear or even clear, and the same problem exists with IBM DB2's graphic tools. Many users think the font is not easy to read, but do not know how to set it to make the font more beautiful. For example:

The following describes how to set DB2 V8 and DB2 V9 in Winddows to Chinese 5th (Simplified Chinese Font types that many people like ). You can also set your favorite fonts in a similar way.

 



Back to Top

 

Java font

Java uses the logical font ing to the physical font corresponding to the running platform to process the font display. Java defines five logical fonts: Serif (with Serif) sans-serif, Monospaced, Dialog (Dialog box), and DialogInput (Dialog box input ). Each font pair has four font styles: plain (flat), bold (bold), italic (italic), and bolditalic (rough ). In the DB2 tool settings, the default menu font is Dialog (Dialog box), and the default text font is Sans-serif (unlined). We can select the logical font, size, and color, however, you cannot select a specific physical font.
Set in the JRE Font configuration file. For example:



Back to Top

 

Display Mechanism

The main factors that affect the graph font of DB2 are the current language code page, database character set, installed font and font configuration file.

1. Language code page:

The language code page is the current language environment, used in Linux and UNIX environments. profile file configuration. To view the Active code page settings in Windows, type: chcp and a message similar to the following is displayed: Active code page: 437, to change the active code page to 850 (multiple languages), type: chcp 850. If the specified code page is Invalid, the following error message is displayed: Invalid code page. The following table lists all supported code pages and their countries or languages:

 

2. database character set:

You can use db2set to view the character set used by the current DB2 instance and set the instruction syntax of the character set to db2set DB2CODE = Character Set code. (Note: After setting it in the Windows command line, you must exit and re-run another command line session to take effect ). The following table lists the common language code pages and character sets (different character sets use different physical fonts in the font configuration file ):

3. Installed fonts:

On Windows, you can view the installed fonts in "Control Panel-> font. In addition, JRE also comes with several fonts in % JAVAHOME % \ lib \ fonts.

Note: % JAVAHOME % refers to the root directory installed in Java. For example, the default directory in Windows is C: \ Program Files \ IBM \ SQLLIB \ java \ jdk \ jre.

4. font configuration file:

Different Versions of JRE have different font configuration files. The JRE version installed in DB2 8 is 1.4, while that installed in DB2 9 is 1.5. You can run the % JAVAHOME % \ bin \ java-version command to view the installed JRE version. For example, run C: \ Program Files \ IBM \ SQLLIB \ java \ jdk \ jre \ bin \ java-version. The result is as follows:

(1) JRE 1.4 font configuration file and configuration syntax

For the JRE1.4 font configuration method, refer to the special introduction on the Sun Website:
Http://java.sun.com/j2se/1.4.2/docs/guide/intl/fontprop.html

Only the font configuration method in the simplified Chinese environment of Windows is described here. Because the JRE version After IBM DB2 V8.2 is installed is 1.4, the font configuration file applied in the simplified Chinese environment is % JAVAHOME % \ lib \ font. properties. zh. In the Simplified Chinese environment, the default text body is Simsun (Founder Extended). This font is a-正 font set and sometimes looks ugly, we need to change it to Simsun font (). In some cases, the font of the graphic tool after DB2 is installed is not ugly, because Simsun (Founder
Extended), the system selects Simsun font by default. Specific Method:
Replace "Simsun (Founder Extended) and GB2312_CHARSET" in the font. properties. zh file with "Simsun, GB2312_CHARSET" and restart the graphic tool (such as the DB2 control center.

(2) JRE1.5 font configuration file and configuration syntax

For the JRE1.5 font configuration method, refer to the special introduction on the Sun Website:
Http://java.sun.com/j2se/1.5.0/docs/guide/intl/fontconfig.html

Only the font configuration method in the simplified Chinese environment of Windows is described here. Because the JRE version after the IBM DB2 V9.1 installation is 1.5, in the simplified Chinese environment, the text font still defaults to Simsun (Founder Extended),-正, we need to change it to Simsun font (). Specific Method:
Step 1: Copy % JAVAHOME % \ lib \ fontconfig. properties. src to % JAVAHOME % \ lib \ fontconfig. properties;
Step 2: Change "allfonts. chinese-gb18030 = SimSun (Founder Extended)" to "allfonts. chinese-gb18030 = SimSun" in the % JAVAHOME % \ lib \ fontconfig. properties file ";
Step 3: restart the graphical tool (such as the DB2 control center ).

Detailed address http://www.ibm.com/developerworks/cn/data/library/techarticles/dm-0703caojx/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.