内に含まその他のドキュメントサポート リソース | PDF 文書ファイルをダウンロードする (354 KB)
Chapter 4 Asian Solaris FontsThis chapter discusses Korean and Chinese font-related information for developers and programmers. Korean FontsSix typefaces of Korean scalable and bitmap fonts are provided in the Korean Solaris software:
Kodig and Myeongjo contain Korean characters in accord with the KS C 5601 and KS C 5700 standards. Gothic is an alias of Kodig, and Myeongjo is an alias of Myeongjo. Korean Solaris software includes bitmap and scalable Korean fonts under the /usr/openwin/lib/locale/ko/X11/fonts and /usr/openwin/lib/locale/ko.UTF-8/X11/font directories. Korean bitmap fonts are in the subdirectories:
Korean F3 scalable fonts are in the subdirectories:
Korean character ID (CID) scalable fonts are in the subdirectories:
You can use X Font Displayer (xfd) to view a Korean font, for example:
The xfd(1) man page provides more information. All Korean fonts have XLFD font names, and you can use the xlsfonts utility to display these names, as in the following example:
Simplified Chinese FontsSimplified Chinese Solaris software provides Song-style fonts, with Simplified Chinese characters in accord with the GB2312-80 standard. Bitmap Simplified Chinese fonts are provided, located under the /usr/openwin/lib/locale/zh/X11/fonts directory. The fontedit utility enables users to edit bitmap fonts. Simplified Chinese Solaris provides TrueType scalable fonts in the following type faces:
You can use X Font Displayer (xfd) to view a Simplified Chinese font, for example:
The xfd(1) man page provides more information. All Simplified Chinese fonts have XLFD font names, and you can use the xlsfonts utility to display these names as follows, for example:
Traditional Chinese FontsBitmap, scalable, and PostScript composite Traditional Chinese fonts are provided, located in the /usr/openwin/lib/locale/zh_TW/X11/fonts directory. These bitmap fonts are in:
The fontedit utility enables users to edit bitmap fonts. Traditional Chinese Solaris provides TrueType scalable fonts in the following type faces:
These scalable fonts are in: OPENWINHOME/lib/locale/zh_TW/X11/fonts/TrueType Chinese PostScript composite fonts are in: /usr/openwin/lib/locale/zh_TW/X11/fonts/composite You can use X Font Displayer (xfd) to view a Traditional Chinese font, for example:
The xfd(1) man page provides more information. All Traditional Chinese fonts have XLFD font names, and you can use the xlsfonts utility to display these names as in the following example:
Programmer's Font Set FunctionsAsian Solaris software uses the font set mechanisms defined in X11R6. Programmers can access the font set using X11R6 calls such as:
Refer to the X11R6 document for a list of text drawing functions also available in the Korean or Chinese Solaris software. Editing Fonts with fonteditAsian Solaris software provides support for editing bitmap fonts. The Font Editor is in /usr/openwin/bin/fontedit. The Font Editor handles English or Asian characters in Bitmap Distribution Format (BDF), a portable format defined by the MIT X Consortium. BDF font files have the file extension .bdf. However, the Asian Solaris operating environment uses Portable Compiled Format (PCF) for bitmap fonts, and Solaris software provides tools to convert between BDF and PCF. The process of modifying a font involves the following steps.
Adding Bitmap FontsThis section describes how to add a new bitmap font to your environment. The steps assume the working directory is your font directory. Note - Solaris 2.6 includes the Font Admin tool, which you may prefer to use for configuring fonts. However, the tools is available only if you install the entire cluster. For information about the Font Admin tool, see System Administration Guide.
Viewing Bitmap FontsYou can view a font by typing:
With the Korean locale:
With the Simplified Chinese locale:
With the Traditional Chinese locale:
More on Font Encoding and Editing FontsThe X11 encoding of Asian characters follows a 7-bit multibyte scheme with the leading bit of each byte set to zero. This differs from EUC use of 8-bit multibyte encoding with the leading bit set to one. BDF defines the encoding to be a positive decimal integer. For convenience, fontedit lets you specify the 7-bit values of the high and low bytes, which are automatically combined into the decimal value used in the BDF file. For example, to locate EUC character 0xA1A2, you would find the following: Table 4-1 Font Encoding
The character appears in its actual size just above the bitmap editing area as you edit it, and immediately shows the effects of turning pixels on and off. Font ListsAsian Solaris 2.6 uses font lists to display text. A font defines a set of glyphs that represent the characters in a given character set. A "font set" is a collection of fonts needed to display text for a specific locale or language. A "font list" is a list of fonts, font sets, or a combination of the two. This section describes the Asian Solaris font lists and how to select them when starting an Asian Solaris application. The files in /usr/dt/app-defaults/locale/* define the system default font lists, where locale is ko, ko.UTF-8, zh, zh_TW, or zh_TW.BIG5. Korean Font ListsIn the Asian Solaris 2.6 environment, a Korean font list is composed of one English font representing codeset 0 (ASCII) characters in KS C 5636 or ISO8859-1, and one Korean font representing codeset 1 characters in KS C 5601-1987-0. The KS C 5636 and ISO8859-1 character sets are nearly identical. The differences are that KS C 5636 uses only the code values from 0 to 127, and the backslash character (whose ISO8859-1 code value is 92) is replaced by the Korean currency symbol. Asian Solaris 2.6 provides some default font lists defined in the application defaults files in /usr/dt/app-defaults/ko/*. The following is an excerpt from one of the files, Dtwm: Dtwm*icon*fontList: \ -dt-interface system-medium-r-normal-s*ksc*:This portion of the file refers to a font list that contains two fonts previously mentioned that are included in the ko locale: English font, for codeset 0 (ASCII) character font display: -dt-interface system-medium-r-normal-s sans-14-120-75-75-p-60-ksc5636-0 Korean font, for codeset 1 (KS C 5601-1987-0) character font display: -dt-interface system-medium-r-normal-s sans-14-120-75-75-p-120-ksc5601.1987-0Note that these fonts are defined in the file /usr/openwin/lib/locale/ko/X11/fonts/75dpi/fonts.alias. Starting Applications with a Specific Korean Font ListWhen you start an Asian Solaris tool at the command line, you can also specify its fonts. Below is an example of a command line argument used to start a new Korean Solaris terminal with a specified font list:
Korean UTF-8 Font ListsIn the Asian Solaris 2.6 environment, a Korean UTF-8 font list is composed of one English font representing codeset 0 (ASCII) characters in KS C 5636 or ISO8859-1, and one Korean Johap font representing codeset 1 characters in KS C 5601-1992-3. Asian Solaris 2.6 provides some default font lists defined in the application defaults files in /usr/dt/app-defaults/ko.UTF-8/*. The following is an excerpt from one of the files, Dtwm: Dtwm*icon*fontList: \ -dt-interface system-medium-r-normal-s*ksc*:This portion of the file refers to a font list that contains two fonts previously mentioned that are included in the ko locale: English font, for codeset 0 (ASCII) character font display: -dt-interface system-medium-r-normal-s sans-14-120-75-75-p-60-ksc5636-0 Korean Johap font, for codeset 1 (KS C 5601-1992-3) character font display: -dt-interface system-medium-r-normal-s sans-14-120-75-75-p-120-ksc5601.1992-3Note that these fonts are defined in the file /usr/openwin/lib/locale/ko.UTF-8/X11/fonts/75dpi/fonts.alias Starting Applications with a Specific Korean UTF-8 Font ListWhen you start an Asian Solaris tool at the command line, you can also specify its fonts. Below is an example of a command line argument used to start a new Korean Solaris terminal with a specified font list in the Korean UTF-8 locale environment:
Simplified Chinese Font ListsIn the Asian Solaris 2.6 environment, a Simplified Chinese font list is composed of one English font representing codeset 0 (ASCII) characters in gb1988.1989-0 or ISO8859-1, and one Simplified Chinese font representing gb2312.1980-0 characters. Simplified Chinese Solaris 2.6 provides some default font lists defined in application defaults files in /usr/dt/app-defaults/zh/*. The following is an excerpt from one of the files, Dtwm: Dtwm*icon*fontList: \ -dt-interface system-medium-r-normal-s*-*-*-*-*-*-*-*-*: This portion of the file refers to a font list that contains two fonts previously mentioned that are included in the zh locale. "-dt-interface system-medium-r-normal-s serif-14-120-75-75-p-60 -gb1988.1989-0""-dt-interface system-medium-r-normal-s serif-14-120-75-75-p-120 -gb2312.1980-0" The first is an English font for codeset 0 (ASCII) character font display. The second is a Simplified Chinese font for codeset 1 (GB2312.1980) character font display. Note that these fonts are defined in the file /usr/openwin/lib/locale/zh/X11/fonts/75dpi/fonts.alias. Starting Applications with a Specific Simplified Chinese Font ListWhen you start an Asian Solaris tool at the command line, you can also specify its fonts. Below is an example of a command line argument used to start a Simplified Chinese Windows terminal with a specified font list:
Traditional Chinese (zh_TW) Font ListsIn the Asian Solaris 2.6 environment, a Traditional Chinese (zh_TW) font list is composed of one English font, representing ASCII characters in CNS11643-0 or ISO8859-1, and a number of Traditional Chinese fonts representing characters such as CNS11643-1, CNS1643-1, CNS11643-2, and CNS11643-3. Traditional Chinese Solaris provides some default font lists defined in application defaults files in /usr/dt/app-defaults/zh_TW/*. The following is an excerpt from one of these files, Dtwm: Dtwm*icon*fontList: \ -dt-interface system-medium-r-normal-s*-*-*-*-*-*-*-*-*:This portion of the file refers to a font list that contains the following fonts, which are defined in /usr/openwin/lib/locale/zh_TW/X11/fonts/75dpi/fonts.alias: "-dt-interface system-medium-r-normal-s serif-16-140-75-75-p-70-cns11643-0" "-dt-interface system-medium-r-normal-s serif-16-140-75-75-p-140-cns11643-1" "-dt-interface system-medium-r-normal-s serif-16-140-75-75-p-140-cns11643-2" "-dt-interface system-medium-r-normal-s serif-16-140-75-75-p-140-cns11643-3"The first is the English font for codeset 0 (ASCII) character font display. The rest are Traditional Chinese fonts for codeset 1 (CNS11643) plane 1 character font display, and codeset 2 (CNS11643) plane 2 and plane 3 character font display. Starting Applications with a Specific Traditional Chinese Font ListWhen you start an Asian Solaris tool at the command line, you can also specify its fonts. Below is an example of a command line argument used to start a new Traditional Chinese Windows terminal with a specified font list:
Traditional Chinese (zh_TW.BIG5) Font ListsIn the Asian Solaris 2.6 environment, a Traditional Chinese zh_TW.BIG5 font list is composed of one English font, representing ASCII characters, and one Traditional Chinese font representing Chinese characters in Big 5. Traditional Chinese Solaris provides some default font lists defined in an application defaults file in /usr/dt/app-defaults/zh_TW.BIG5/*. Below is a part of one of the files, Dtwm: Dtwm*icon*fontList: \ -dt-interface system-medium-r-normal-s*-*-*-*-*-*-*-*-*This font list contains the following fonts, defined in /usr/openwin/lib/locale/zh_TW.BIG5/X11/fonts/75dpi/fonts.alias: "-dt-interface system-medium-r-normal-s serif-16-140-75-75-p-70-big5-0" "-dt-interface system-medium-r-normal-s serif-16-140-75-75-p-140-big5-1"The first is an English font for ASCII character font display. The second is a Traditional Chinese Big 5 font. Starting Applications with a Specific Traditional Chinese Font ListWhen you start an Asian Solaris tool at the command line, you can also specify its fonts. The following is an example of using a command line argument to start a new Traditional Chinese Windows terminal with a specified font list.
Displaying PostScript FontsFor screen displays, Asian Solaris software provides PostScript fonts through the Display PostScript System (DPS), as explained in Chapter 6, Display PostScript System (DPS) . |
|||||||||||||||||||||||||||