Korean Solaris User's Guide

Chapter 10 Fonts

The following sections in this chapter describe how to use and edit the Korean Solaris fonts.

This chapter also describes how to convert BDF font files to Portable Compiled Format (PCF) format and how to make the fonts usable on your system.

Display PostScript System (DPS)

The Korean Solaris Operating System provides PostScript fonts in the Display PostScript System (DPS). This section describes what you need to use DPS in Korean Solaris software. For further details, see Programming the Display PostScript System with X, published by Adobe Systems.

Using Korean PostScript Fonts and DPS Facilities

The Korean Solaris Operating System DPS provides the fonts listed in the following table.

Table 10–1 Korean Solaris Operating System DPS Fonts

Font Name 

Description 

Kodig-Medium-COMB-H 

Kodig-Medium font, 9/7 composite font encoding for horizontal display of Johap encoded Hangul and Roman text. 

Kodig-Medium-COMB-V 

Kodig-Medium font, 9/7 composite font encoding for vertical display of Johap encoded Hangul and Roman text. 

Kodig-Medium 

Kodig-Medium font, an alias of Kodig-Medium-EUC-H font; can be used like a Roman font. 

Kodig-Medium-EUC-H 

Kodig-Medium font, 9/7 composite font encoding for horizontal display of EUC text, can be used like a Roman font. 

Kodig-Medium-EUC-V 

Kodig-Medium font, 9/7 composite font encoding for vertical display of EUC text; can be used like a Roman font. 

Kodig-Medium-H 

Kodig-Medium font, 8/8 composite font encoding for horizontal display of shifted out ISO2022 text. 

Kodig-Medium-V 

Kodig-Medium font, 8/8 composite font encoding for vertical display of shifted out ISO2022 text. 

Myeongjo-Medium-COMB-H 

Myeongjo-Medium font, 9/7 composite font encoding for horizontal display of Johap encoded Hangul and Roman text. 

Myeongjo-Medium-COMB-V 

Myeongjo-Medium font, 9/7 composite font encoding for vertical display of Johap encoded Hangul and Roman text. 

Myeongjo-Medium 

Myeongjo-Medium font, an alias of Myeongjo-Medium-EUC-H font; can be used like a Roman font. 

Myeongjo-Medium-EUC-H 

Myeongjo-Medium font, 9/7 composite font encoding for horizontal display of EUC text; can be used like a Roman font. 

Myeongjo-Medium-EUC-V 

Myeongjo-Medium font, 9/7 composite font encoding for vertical display of EUC text; can be used like a Roman font. 

Myeongjo-Medium-H 

Myeongjo-Medium font, 8/8 composite font encoding for horizontal display of shifted out ISO2022 text. 

Myeongjo-Medium-V 

Myeongjo-Medium font, 8/8 composite font encoding for vertical display of shifted out ISO2022 text. 

You can use the following Korean fonts just as you would use Roman fonts.

The following figure shows a sample of Kodig-Medium and Myeongjo-Medium text.

Terminal window shows the dpsexec program that is run to display the Kodig-Medium and Myeongjo-Medium text in the next graphic.Window titled Display PostScript Executive that displays the Kodig-Medium and Myeongjo-Medium text.

You can also use the following Korean fonts for pure Hangul between the SO and SI characters with no intermediate ASCII (0x20) characters.

Creating Composite Korean Fonts

You can create composite fonts using one Roman font and one of the following Korean fonts.

For example, the following PostScript code defines a sample composite font. The ASCII characters of the Times-Italic+Kodig-Medium font are combined with the Korean characters of the Kodig-Medium horizontal font.


/Times-Italic+Kodig-Medium
13 dict begin
				/FontName 1 index def
				/FMapType 4 def
				/Encoding [ 0 1 ] def
				/WMode 0 def
				/FontType 0 def
				/FontMatrix [1.0 0.0 0.0 1.0 0.0 0.0] def
				/FDepVector [
								/Times-Italic findfont
								/Kodig-Medium-COMB-H findfont
				] def
currentdict
end
definefont pop

Using Korean Fonts in DPS Programming

You can use Korean fonts just as you use Roman fonts in DPS wrap definitions. This sample code creates the display which follows.


defineps PSWDisplayText(char *text)
			/pointSize 50 def
			/Helvetica pointSize selectfont
			(Hello World) stringwidth pop 2 div neg 0 moveto
			(Hello World) show

			/cpSize 40 def
			/Kodig-Medium-KO cpSize selectfont
			(text) stringwidth pop 2 div neg pointSize neg moveto
			(text) show
endps

You can set PSWDisplayText in a C program to display the designated Korean text.

Window shows the text Hello World in English and in Korean characters.

BDF and PCF Formats

You must convert BDF fonts to PCF format to make the fonts usable in Korean Solaris applications.

How to Convert BDF Fonts to PCF Format

    Use the bdftopcf command to convert a BDF font to PCF format.


    system% bdftopcf -o myfont14.pcf myfont14.bdf
    

    The -o option enables the matrix encoding used for Asian PCF font files.

How to Install and Check an Edited Font

  1. Compress the .pcf font file and move it to your font directory.


    system% compress myfont14.pcf
    
  2. Run the following commands in your font directory.

    The .bdf file should not be in the font directory.


    system% cat >> fonts.alias
    -new-myfont-medium-r-normal--16-140-75-75-c-140-ksc5601.1987-0 
    Myfont-Medium14
    ^D
    system% mkfontdir
    system% xset +fp `pwd`
    

  3. Use a command line such as the following to view your font.


    system% xfd -fn Myfont-Medium14
    

Changing Font Directories

The Xsession script in /usr/dt/bin directory of the Korean Solaris Operating System includes the following font path: /usr/openwin/lib/locale/locale/X11/fonts, where locale is either ko or ko.UTF-8. To dynamically add a different font directory path, type the following commands:


system% xset +fp font_directory-path
system% xset fp rehash

Bitmap and TrueType Fonts

The tables in this section list the bitmap and TrueType fonts that are supported for the ko, the ko.UTF-8, and the ko/ko.UTF-8 locales.

The following table shows the Korean bitmap fonts for the ko locale.

Table 10–2 Korean Bitmap Fonts for the ko Locale

Full Family Name 

Subfamily 

Format 

Encoding 

 Gothic R/B PCF (12,14,16,18,20,24) KS X 1001
 Graphic R/B PCF (12,14,16,18,20,24) KS X 1001
 Haeso R/B PCF (12,14,16,18,20,24) KS X 1001
 Kodig R/B PCF (12,14,16,18,20,24) KS X 1001
 Myeongijo R/B PCF (12,14,16,18,20,24) KS X 1001
 Pilki R/B PCF (12,14,16,18,20,24) KS X 1001
 Round gothic R/B PCF (12,14,16,18,20,24) KS X 1001

The following table shows the Korean bitmap fonts for the ko.UTF-8 locale.

Table 10–3 Korean Bitmap Fonts for the ko.UTF-8 Locale

Full Family Name 

Subfamily 

Format 

Encoding 

 Gothic R/B PCF (12,14,16,18,20,24)KS X 1001 (Johap)
 Graphic R/B PCF (12,14,16,18,20,24)KS X 1001 (Johap)
 Haeso R/B PCF (12,14,16,18,20,24)KS X 1001 (Johap)
 Kodig R/B PCF (12,14,16,18,20,24)KS X 1001 (Johap)
 Myeongijo R/B PCF (12,14,16,18,20,24)KS X 1001 (Johap)
 Pilki R/B PCF (12,14,16,18,20,24)KS X 1001 (Johap)

The following table shows the Korean TrueType Fonts for the ko/ko.UTF-8 locales.

Table 10–4 Korean TrueType Fonts for the ko/ko.UTF-8 Locales

Full Family Name 

Subfamily 

Format 

Vendor 

Encoding 

Kodig/Gothic 

TrueType 

Hanyang 

Unicode 

Myeongijo 

TrueType 

Hanyang 

Unicode 

Haeso 

TrueType 

Hanyang 

Unicode 

Round gothic 

TrueType 

Hanyang 

Unicode