Tru64 UNIX Technical Reference for Using Thai Features September 2002 This guide provides the Thai-specific information and describes the Thai features supported on the Tru64 UNIX system. Revision/Update Information: This manual replaces the previous version. Product Version: Version 5.1B and higher Hewlett-Packard Company Palo Alto, California © 2002 Hewlett-Packard Company Microsoft®, Windows®, and Windows NT® are trademarks of Microsoft Corporation in the U.S. and/or other countries. Motif®, OSF/1®, UNIX®, and X/Open® are trademarks of The Open Group in the U.S. and/or other countries. All other product names mentioned herein may be the trademarks of their respective companies. Confidential computer software. Valid license from Compaq Computer Corporation, a wholly owned subsidiary of Hewlett-Packard Company, required for possession, use, or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. None of Compaq, HP, or any of their subsidiaries shall be liable for technical or editorial errors or omissions contained herein. The information in this publication is provided "as is" without warranty of any kind and is subject to change without notice. The warranties for Compaq products are set forth in the express limited warranty statements accompanying such products. Nothing herein should be construed as constituting an additional warranty. Table of Contents Preface 1 Character Sets............................................................................................ 1–1 1.1 Consonants ...................................................................................................................................1–1 1.2 Vowels..........................................................................................................................................1–5 1.3 Tone Marks ..................................................................................................................................1–6 1.4 Diacritics ......................................................................................................................................1–6 1.5 Noncomposible Characters...........................................................................................................1–7 2 Codesets..................................................................................................... 2–1 2.1 Character Classification................................................................................................................2–3 2.2 Character Levels...........................................................................................................................2–5 3 Locales ....................................................................................................... 3–1 4 Local Language Devices ........................................................................... 4–1 4.1 Terminals......................................................................................................................................4–1 4.2 Printers .........................................................................................................................................4–1 5 Fonts ........................................................................................................... 5–1 5.1 DECwindows Fonts......................................................................................................................5–1 5.1.1 XLFD Font Names .............................................................................................................5–1 iii 5.1.2 Bitmap Font Samples ........................................................................................................ 5–2 5.1.3 Specifying Fonts in DECwindows Applications................................................................ 5–3 5.1.4 Outline Fonts ..................................................................................................................... 5–3 5.2 XLFD Font Names of Thai Outline Fonts ................................................................................... 5–4 5.3 Outline Font Samples .................................................................................................................. 5–6 6 Keyboards...................................................................................................6–1 6.1 Keyboard Layout ......................................................................................................................... 6–1 6.2 Keyboard Indicator ...................................................................................................................... 6–4 7 Thai Input Methods ....................................................................................7–1 7.1 Character–Cell Terminal Applications ........................................................................................ 7–1 7.2 DECwindows Motif and CDE Applications ................................................................................ 7–2 7.2.1 Loading Keymaps.............................................................................................................. 7–3 7.3 Input Methods.............................................................................................................................. 7–4 7.3.1 Thai Character Input.......................................................................................................... 7–4 7.3.2 Special Thai Characters Input............................................................................................ 7–4 7.3.2.1 Special Thai Character Input Method ................................................................. 7–4 7.3.2.2 Hexadecimal Input Method ................................................................................ 7–5 7.3.3 English Character Input ..................................................................................................... 7–6 7.4 Input Sequence Check Modes...................................................................................................... 7–6 7.4.1 Selecting Input Sequence Check Mode ............................................................................. 7–6 7.4.1.1 DECwindows Motif............................................................................................ 7–6 7.4.1.2 Character-Cell Terminal Applications................................................................ 7–7 7.4.2 NISC Mode/Passthrough Mode ......................................................................................... 7–8 7.4.3 VT382–T ISC Mode.......................................................................................................... 7–8 7.4.4 WTT Basic Mode ............................................................................................................ 7–11 7.4.5 WTT Strict Mode ............................................................................................................ 7–11 8 Thai Printing Support.................................................................................8–1 8.1 Supported Printers ....................................................................................................................... 8–1 8.2 Print File Formats ........................................................................................................................ 8–1 8.3 Printing Features.......................................................................................................................... 8–2 8.3.1 Font Faulting ..................................................................................................................... 8–2 8.3.2 Font Preloading ................................................................................................................. 8–2 8.3.3 Outline Fonts ..................................................................................................................... 8–3 8.3.4 Printer ID for DOT Matrix Printers................................................................................... 8–3 8.3.5 Control Sequence for Dot Matrix Printers ......................................................................... 8–3 8.3.6 Printing Enhancement Rules (Text Morphing) .................................................................. 8–4 iv 8.3.7 Space Compensating ..........................................................................................................8–5 8.3.8 Half–Height Printing ..........................................................................................................8–5 8.4 Commands and Daemons .............................................................................................................8–5 8.4.1 Country-Specific Options to the lpr command ...................................................................8–5 8.4.2 PostScript Font Management Utility (pfsetup) ...................................................................8–7 8.4.3 Font Faulting Daemon (ffd)................................................................................................8–9 8.4.4 PrintServer Printing Command (wwlpspr) .........................................................................8–9 8.5 Setting Up Thai Printing...............................................................................................................8–9 8.5.1 Thai Epson LQ1050+ .......................................................................................................8–10 8.5.2 DEClaser 1152 .................................................................................................................8–11 8.5.3 DEClaser 5100 .................................................................................................................8–13 8.5.4 PrintServer 17...................................................................................................................8–15 8.5.5 Using the wwpsof Filter with PostScript Printers.............................................................8–16 9 Other Thai Features ................................................................................... 9–1 9.1 Thai Terminal Driver ...................................................................................................................9–1 9.1.1 Input Sequence Checking ...................................................................................................9–1 9.1.2 Thai Character Reordering .................................................................................................9–2 9.1.3 History Mode .....................................................................................................................9–2 9.2 Thai DECterm ..............................................................................................................................9–3 9.2.1 Creating a Thai DECterm Window ....................................................................................9–3 9.2.2 Customizing a Thai DECterm Window..............................................................................9–4 9.2.3 Font Sizes ...........................................................................................................................9–4 9.2.4 Terminal ID........................................................................................................................9–4 9.2.5 Copying Information ..........................................................................................................9–4 9.2.6 Default Character Set .........................................................................................................9–4 9.2.7 Thai Character Input...........................................................................................................9–5 9.2.8 Thai Character Output ........................................................................................................9–5 9.2.9 Cursor Movement...............................................................................................................9–7 9.2.10 Other VT382–T Functionalities........................................................................................9–7 9.2.11 CSText Widget.................................................................................................................9–8 9.2.12 Cursor Movement.............................................................................................................9–8 9.2.13 Delete Character Operation ..............................................................................................9–9 Figures Figure 2-1: TACTIS Codeset .............................................................................................................2–2 Figure 5–1: Screen Font Sample ........................................................................................................5–2 Figure 5–2: AngsanaUPC Font Sample..............................................................................................5–6 Figure 5–3: CordiaUPC Font Sample.................................................................................................5–6 Figure 5–4: EucrosiaUPC Font Sample..............................................................................................5–7 v Figure 5–5: FreesiaUPC Font Sample ............................................................................................... 5–7 Figure 5–6: IrisUPC Font Sample ..................................................................................................... 5–7 Figure 5–7: JasmineUPC Font Sample.............................................................................................. 5–8 Figure 5–8: KodchiangUPC Font Sample ......................................................................................... 5–8 Figure 5–9: LilyUPC Font Sample .................................................................................................... 5–8 Figure 5–10: WaterlilyUPC Font Sample.......................................................................................... 5–9 Figure 5–11: YuccaUPC Font Sample............................................................................................... 5–9 Figure 6-1: LK201-T Keyboard Layout ............................................................................................ 6–2 Figure 6-2: LK401-T Keyboard Layout ............................................................................................ 6–2 Figure 6-3: LK201-WTT Keymap Layout ........................................................................................ 6–3 Figure 6-4: LK401-WTT Keymap Layout ........................................................................................ 6–3 Figure 7-1: Valid Patterns of Thai Character Composition ............................................................... 7–8 Figure 8-1: Two-channel Communication of the Font Faulting Mechanism ................................... 8–11 Figure 9–1: Space Compensation Mode ............................................................................................ 9–6 Figure 9–2: Internal Cursor Mode ..................................................................................................... 9–7 Tables Table 2–1: Thai Character Classification .......................................................................................... 2–4 Table 4–1: Thai Print Filters.............................................................................................................. 4–2 Table 5–1: Thai Screen Fonts............................................................................................................ 5–1 Table 5–2: Thai Default Font List ..................................................................................................... 5–3 Table 5–3: Thai Outline Fonts........................................................................................................... 5–3 Table 5–4: XLFD of Thai Outline Fonts ........................................................................................... 5–5 Table 7–1: Thai Keymaps ................................................................................................................. 7–3 Table 7–2: Thai Input Invocation Key............................................................................................... 7–4 Table 7–3: Special Thai Characters Input Method ............................................................................ 7–5 Table 7–4: Thai Input Sequence Check Modes ................................................................................. 7–6 Table 7–5: VT382-T ISC Mode Lookup Table ............................................................................... 7–10 Table 7–6: WTT ISC Mode Lookup Table...................................................................................... 7–12 Table 8–1: Escape Sequence Names ................................................................................................. 8–4 vi Preface This guide provides Thai-specific information, such as character sets and locales, for end users and programmers so that they can use and develop internationalized applications in Thai locales on the Tru64 UNIX operating system. The details of the Thai features are also documented in this guide. Intended Audience This guide is intended for new and experienced Tru64 UNIX operating system end users and programmers who are interested in the Thai variant. Structure of This Guide This guide consists of nine chapters: Chapter 1 Describes the Thai character sets supported in the Tru64 UNIX operating system software. Chapter 2 Describes the Thai codesets. Chapter 3 Describes the Thai locales. Chapter 4 Describes the hardware devices that support the Thai locales. vii Chapter 5 Provides information on Thai fonts. Chapter 6 Provides information on Thai keyboards. Chapter 7 Describes how to input Thai characters. Chapter 8 Introduces the Thai printing support. Chapter 9 Describes other Thai features. Related Documents Writing Software for the International Market Programming for the World: A Guide to Internationalization, Sandra Martin O'Donnell, Prentice Hall, 1994 OSF/Motif User’s Guide Revision 1.2, Open Software Foundation, Prentice Hall, Englewood Cliffs, New Jersey 07632 OSF/Motif Style Guide Revision 1.2, Open Software Foundation, Prentice Hall, Englewood Cliffs, New Jersey 07632 X Window System, Third Edition, Robert W. Scheifler and James Gettys, Digital Press Programmer’s Supplement for Release 5 of the X Window System, Version 11, David Flanagan, O'Reilly & Associates, Inc. Draft Industrial Standard - Thai Language Software Standard WTT2.0 Conventions The following typographical conventions are used in this manual: viii % $ A percent sign represents the C shell system prompt. A dollar the system prompt for the Bourne and Korn shell. # A number sign represents the superuser prompt. % cat Boldface type in interactive examples indicates typed user inp file Italic (slanted) type indicates variable values, placeholders, an argument names. [|] {|} In syntax definitions, brackets indicate items that are optional indicate items that are required. Vertical bars separating items or braces indicate that you choose one item from among those ... In syntax definitions, a horizontal ellipsis indicates that the pre be repeated one or more times. cat(1) A cross-reference to a reference page includes the appropriate in parentheses. For example, cat(1) indicates that you can fin on the cat command in Section 1 of the reference pages. [RETURN] In an example, a key name enclosed in a box indicates that you Ctrl/x This symbol indicates that you hold down the first named key the key or mouse button that follows the slash. In examples, th combination is enclosed in a box (for example [Ctrl/C]). ix 1 Character Sets The Tru64 UNIX operating system software supports the Thai Industrial Standard (TIS) character set TIS 620-2533. The TIS 620 character set is a national standard for a primary set of graphic characters for Thai information interchange. It was first published by the Thai Industrial Standards Institute, Ministry of Industry, Thailand in 1986 (Buddhist year 2529) and was revised in 1990 (Buddhist year 2533). It defines 89 characters. 1.1 Consonants The TIS 620 character set contains 44 consonants, as shown in the following figure and table. Tru64 UNIX Technical Reference for Using Thai Features 1–1 1–2 Tru64 UNIX Technical Reference for Using Thai Features Decimal Hexadecimal Character Name 161 A1 KO KAI 162 A2 KHO KHAI 163 A3 KHO KHUAT 164 A4 KHO KHWAI 165 A5 KHO KHON 166 A6 KHO RAKHANG 167 A7 NGO NGU 168 A8 CHO CHAN 169 A9 CHO CHING 170 AA CHO CHANG 171 AB SO SO 172 AC CHO CHOE 173 AD YO YING 174 AE DO CHADA Tru64 UNIX Technical Reference for Using Thai Features 1–3 Decimal Hexadecimal Character Name 175 AF TO PATAK 176 B0 THO THOTHAN 177 B1 THO NANGMONTHO 178 B2 THO PHOO THAO 179 B3 NOR NANE 180 B4 DOR DEK 181 B5 TO TAO 182 B6 THO THUNG 183 B7 THO THAHAN 184 B8 THO THONG 185 B9 NO NU 186 BA BO BAIMAI 187 BB PO PLA 188 BC PHO PERNG 189 BD FO FA 190 BE PO PAN 191 BF FO FAN 192 C0 PO SAMPOW 193 C1 MO MA 194 C2 YO YAK 195 C3 RO RUA 197 C5 LO LING 199 C7 WO WAEN 200 C8 SO SALA 201 C9 SO RUSI 202 CA SO SUA 203 CB HO HEEP 204 CC LO CHULA 205 CD O ANG 206 CE HO NOKHUK 1–4 Tru64 UNIX Technical Reference for Using Thai Features 1.2 Vowels The TIS 620 character set contains 18 vowels, divided into four groups. Five leading vowels; these vowels are placed before consonants: Decimal Hexadecimal Character Name 224 E0 SARA E 225 E1 SARA AE 226 E2 SARA O 227 E3 SARA AI MAIMUAN 228 E4 SARA AI MAIMALAI Six following vowels; these vowels are placed after consonants. The six following vowels are further divided into two groups. Normal following vowels: Decimal Hexadecimal Character Name 208 D0 SARA A 210 D2 SARA AA 211 D3 SARA AM 229 E5 LAKKHANGYAO Decimal Hexadecimal Character Name 196 C4 RU 198 C6 LU Special following vowels: Two below vowels; these vowels are placed below consonants: Decimal Hexadecimal Character Name 216 D8 SARA U 217 D9 SARA UU Tru64 UNIX Technical Reference for Using Thai Features 1–5 Five above vowels; these vowels are placed above consonants: Decimal Hexadecimal Character Name 209 D1 MAI HAN-AKAT 212 D4 SARA E 213 D5 SARA EE 214 D6 SARA UR 215 D7 SARA UUR 1.3 Tone Marks The TIS 620 character set contains four tone marks: Decimal Hexadecimal Character Name 232 E8 MAI EK 233 E9 MAI THO 234 EA MAI TRIE 235 EB MAI CHATTAWA 1.4 Diacritics The TIS 620 character set contains five diacritics divided into two groups. Four above diacritics; these diacritics are placed above initial or final consonants: Decimal Hexadecimal Character Name 231 E7 MAITAIKHU 236 EC THANTHAKHAT 237 ED NIKHAHIT 238 EE YAMAKKAN One below diacritic; this diacritic is placed below final or clustered consonants: Decimal Hexadecimal Character Name 218 DA PHINTHU 1–6 Tru64 UNIX Technical Reference for Using Thai Features 1.5 Noncomposible Characters The TIS 620 character set contains 18 noncomposible characters. These characters cannot be composed with above vowels, below vowels, tone marks, above diacritics and below diacritic. Noncomposible characters are divided into four groups. One no-break space: Decimal Hexadecimal Character Name 160 A0 NO-BREAK SPACE Decimal Hexadecimal Character Name 240 F0 THAI ZERO Ten Thai digits: 241 F1 THAI ONE 242 F2 THAI TWO 243 F3 THAI THREE 244 F4 THAI FOUR 245 F5 THAI FIVE 246 F6 THAI SIX 247 F7 THAI SEVEN 248 F8 THAI EIGHT 249 F9 THAI NINE Decimal Hexadecimal Character Name 207 CF PAYANGNOI 223 DF BAHT (Thai currency sign) 230 E6 MAIYAMOK 239 EF FONGMAN 250 FA ANGKHANKHU 251 FB KHOMUT Six Thai special characters: One word separator; a nonprintable character. Decimal Hexadecimal Character Name 220 DC WORD SEPARATOR Tru64 UNIX Technical Reference for Using Thai Features 1–7 1–8 Tru64 UNIX Technical Reference for Using Thai Features 2 Codesets The Tru64 UNIX operating system software supports the following Thai codeset: • TACTIS (Thai API Consortium/Thai Industrial Standard) The TACTIS codeset, shown in Figure 2-1, is composed of the ASCII (ISO 646-1991) character set and the TIS 620-2533 character set. This is an 8-bit codeset with characters assigned values from 0x0 to 0xFF. Tru64 UNIX Technical Reference for Using Thai Features 2–1 Figure 2-1: TACTIS Codeset 2–2 Tru64 UNIX Technical Reference for Using Thai Features 2.1 Character Classification To facilitate the processing of characters encoded in the TACTIS codeset, such as displaying Thai characters and input-sequence checking, characters are classified into several categories: • Control Characters (CTRL). Nondisplayable control characters can be used to control output or for data communication. The 66 control characters are: 00-1F, 7F, 80-9F and FF. • Consonants (CONS). The 44 Thai consonants defined in TIS 620-2533. • Vowels (-V) • • – Leading vowels (LV). The five leading vowels defined in TIS 620-2533. – Following vowels (FV). The six following vowels defined in TIS 620-2533. – Below vowels (BV). The two below vowels defined in TIS 620-2533. – Above vowels (AV). The five above vowels defined in TIS 620-2533. – Tone marks (TONE). The four tone marks defined in TIS 620-2533. Diacritics (-D) – Above diacritics (AD). The four above diacritics defined in TIS 620-2533. – Below diacritic (BD). The below diacritic defined in TIS 620-2533. Noncomposibles (NON). Those characters that do not fit into the other four character classes. This group of characters cannot be composed with above vowels, below vowels, tone marks, above diacritics, and below diacritic. There are 119 noncomposible characters divided into seven groups: – Graphic characters. The 94 graphic characters defined in ISO 646-1991. They include: * 52 English alphabetic characters (A-Z, a-z) * 10 digits (0-9) * 32 special characters: 21-2F, 3A-3F and 7B-7E – Space. The character code is 20. – No-Break space. The character code is A0. – Thai digits. The ten Thai digits defined in TIS 620-2533. – Thai special characters. The six Thai special characters defined in TIS 620-2533. Tru64 UNIX Technical Reference for Using Thai Features 2–3 – Word separator. The word separator defined in TIS 620-2533. – Reserved code points. Six code points are reserved for future use. To meet some special requirements of Thai input and output, some character classes, such as FV, BV, AV, and AD, are further divided into subclasses. For details, see Table 2–. Table 2–1: Thai Character Classification Class Number Description CTRL 66 ISO 646-1983 control codes: 00-1F, 7F, 80-9F, FF NON 119 • ISO 646-1991 character codes: 20-7E • TIS 620-2533 character codes: A0, CF, DC, DF, E6, EF, F0-F9, FA, FB • Reserved code points: DB, DD, DE, FC, FD, FE. CONS 44 A1-C3, C5, C7-CE LV 5 E0, E1, E2, E3, E4 FV1 3 D0, D2, D3 FV2 2 E5 FV3 2 C4 and C6 (These two characters also behave as LV in the case of LV+CONS) BV1 1 D8 BV2 1 D9 BD 1 DA TONE 4 E8, E9, EA, EB AD1 2 ED, EC AD2 1 E7 AD3 1 EE AV1 1 D4 AV2 2 D1, D6 AV3 2 D5, D7 2–4 Tru64 UNIX Technical Reference for Using Thai Features 2.2 Character Levels Characters defined in the TACTIS codeset can also be classified according to character levels. There are five character levels: • Nondisplayable level includes all control characters in the CTRL category. • Base level includes all characters in the NON, CONS, FV and LV categories. Characters at this level are drawn on baseline. • Above level includes all characters in the AD3, AV1, AV2 and AV3 categories. Characters at this level are drawn directly above final consonants. • Below level includes all characters in the BV1, BV2 and BD categories. Characters at this level are drawn directly below final consonants. • Top level includes all characters in the TONE, AD1 and AD2 categories. Characters at this level are drawn on top of above characters. If above level characters do not exist, top level characters can be drawn at the above level. Characters at this level also indicate the end of character cells. Tru64 UNIX Technical Reference for Using Thai Features 2–5 3 Locales The Tru64 UNIX operating system software supports a single Thai locale that has two names: • th_TH • th_TH.TACTIS If you are using DECwindows Motif, you can choose the locale from the Language menu of the Session Manager. If you are using CDE, you can choose the locale from the language menu on the CDE login screen. Tru64 UNIX Technical Reference for Using Thai Features 3–1 4 Local Language Devices 4.1 Terminals The Tru64 UNIX operating system software supports the VT382-T Thai terminal. Thai DECterm is the emulation of the VT382-T Thai terminal, which provides compatible functionalities for running Thai character-cell terminal applications. For the details of Thai DECterm, see Chapter 9, Other Thai Features. Character-cell terminal applications can process the Thai locale properly through Tru64 UNIX run-time libraries, such as the C library and the curses library, with the information defined in the terminfo and termcap databases. To set up the environment to process in the Thai locale, you should set the TERM environment variable to vt382t by entering the following command: % setenv TERM vt382t 4.2 Printers The Tru64 UNIX operating system software supports the following dot matrix Thai printer: • Epson LQ1050+ The following PostScript printers can be configured for Thai printing: • DEClaser 1152 • DEClaser 5100 with font disk (LN09X-HD) • PrintServer 17 The generic wwpsof filter can be used to print Thai characters on any PostScript printer. The print filters in Table 4-1 are provided to support Thai printers. Tru64 UNIX Technical Reference for Using Thai Features 4–1 Table 4–1: Thai Print Filters Filter Name Printer Name Thailpof Epson LQ1050+ dl1152wrof DEClaser 1152 dl5100wrof DEClaser 5100 Lpsof PrintServer 17 Wwpsof All PostScript printers _____________________________ Note____________________________ To use PrintServer 17, the PrintServer Software V5.0 or later for Tru64 UNIX, is also required. ______________________________________________________________ For the details about setting up Thai printer queues, see Chapter 8, Thai Printing Support. 4–2 Tru64 UNIX Technical Reference for Using Thai Features 5 Fonts 5.1 DECwindows Fonts The Tru64 UNIX operating system software provides the Thai DECwindows fonts described in Table 5-1 in various sizes for 75 dpi (dot-per-inch) display devices. Table 5–1: Thai Screen Fonts Typefaces Bounding Box Remarks Screen 7 x 14 Mandatory font 8 x 18 Mandatory font 12 x 24 Mandatory font These mandatory fonts are available when you install the Thai variant. In addition to these Thai fonts, several miscellaneous screen fonts are provided in the Thai DECterm and toolkit. No 100 dpi Thai fonts are provided in the kit. To allow you to use the Thai fonts on 100 dpi display devices, a font alias file is provided to map the 75 dpi font names to the respective 100 dpi font names. 5.1.1 XLFD Font Names You must specify the DECwindows font names in XLFD (X Logical Font Description) format in your application programs or in the application resource files. You can specify wildcards (*) for any fields in the font names. You can use the following font names for either 75 dpi or 100 dpi display devices. To explicitly state the display resolution, you can specify 75 or 100 in the X- and Y-resolution fields, that is, the asterisks in the following XLFD names. Screen family font names in XLFD format: Tru64 UNIX Technical Reference for Using Thai Features 5–1 -ADECW-Screen-Medium-R-Normal--18-180-*-*-P-80-TIS620.2533-1 -ADECW-Screen-Medium-R-Normal--14-140-*-*-P-70-TIS620.2533-1 -ADECW-Screen-Medium-R-Normal--24-240-*-*-P-120-TIS620.2533-1 XLFD of miscellaneous Thai screen fonts: XLFD-Font Name Character Set -ADECW-Screen-Medium-R-Normal--18-180-*-*-M-80-iso8859-1 ISO Latin-1 -ADECW-Screen-Medium-R-Normal--18-180-*-*-M-80-DEC-DECctrl DEC Display Control -ADECW-Screen-Medium-R-Normal--18-180-*-*-M-80-DEC-DECsuppl DEC Supplemental -ADECW-Screen-Medium-R-Normal--18-180-*-*-M-80-DEC-DECtech DEC Technical -ADECW-Screen-Medium-R-Normal--24-240-*-*-M-120-iso8859-1 ISO Latin-1 -ADECW-Screen-Medium-R-Normal--24-240-*-*-M-120-DEC-DECctrl DEC Display Control -ADECW-Screen-Medium-R-Normal--24-240-*-*-M-120-DEC-DECsuppl DEC Supplemental -ADECW-Screen-Medium-R-Normal--24-240-*-*-M-120-DEC-DECtech DEC Technical 5.1.2 Bitmap Font Samples Figure 5–1 shows samples of the screen family of Thai fonts. Figure 5–1: Screen Font Sample 5–2 Tru64 UNIX Technical Reference for Using Thai Features 5.1.3 Specifying Fonts in DECwindows Applications Table 5-2 shows the default font list used in the Motif Toolkit. Table 5–2: Thai Default Font List XLFD Font Name Character Set -ADECW-Screen-Medium-R-Normal--*-180-*-*-M-80-iso8859-1 iso8859-1 -ADECW-Screen-Medium-R-Normal--*-180-*-*-P-80-TIS620.2533-1 TIS620.2533-1 -ADECW-Screen-Medium-R-Normal--*-180-*-*-*-*-* Fontset To override the default font list of a Thai DECwindows application, you should specify the ISO Latin-1 and Thai fonts as well as the Thai fontset when creating widget instances. For details, see Writing Software for the International Market. 5.1.4 Outline Fonts The Tru64 UNIX operating system software provides the Thai outline fonts shown in Table 5-3. Table 5–3: Thai Outline Fonts Font Family Font Name AngsanaUPC Family AngsanaUPC-Light AngsanaUPC-Italic AngasanaUPC-Bold AngsanaUPC-BoldItalic CordiaUPC Family CordiaUPC-Light CordiaUPC-Italic CordiaUPC-Bold CordiaUPC-BoldItalic EucrosiaUPC Family EucrosiaUPC-Light EucrosiaUPC-Italic EucrosiaUPC-Bold EucrosiaUPC-BoldItalic FreesiaUPC Family FreesiaUPC-Light FreesiaUPC-Italic FreesiaUPC-Bold FreesiaUPC-BoldItalic IrisUPC Family IrisUPC-Light IrisUPC-Italic IrisUPC-Bold IrisUPC-BoldItalic Tru64 UNIX Technical Reference for Using Thai Features 5–3 JasmineUPC Family JasmineUPC-Light JasmineUPC-Italic JasmineUPC-Bold JasmineUPC-BoldItalic KodchiangUPC Family KodchiangUPC-Light KodchiangUPC-Italic KodchiangUPC-Bold KodchiangUPC-BoldItalic LilyUPC Family LilyUPC-Light LilyUPC-Italic LilyUPC-Bold LilyUPC-BoldItalic WaterlilyUPC Family WaterlilyUPC-Light WaterlilyUPC-Italic WaterlilyUPC-Bold WaterlilyUPC-BoldItalic YuccaUPC Family YuccaUPC-Light YuccaUPC-Italic YuccaUPC-Bold YuccaUPC-BoldItalic These Thai outline fonts can be used for: • Printing on PostScript printers. For details see Chapter 8, Thai Printing Support. • Displaying through the R6 X Windows System Type 1 rasterizer. To use these outline fonts, you must add the $I18NPATH/usr/lib/X11/fonts/Type1UPC directory to your font path with the following command: % xset +fp $I18NPATH/usr/lib/X11/fonts/Type1UPC • Displaying through Display PostScript. You can view PostScript files with Thai characters using the CDA Viewer or through the Display PostScript extension. 5.2 XLFD Font Names of Thai Outline Fonts To use the Thai outline fonts through the Type 1 rasterizer, you can specify the font names in XLFD format in your application programs or in the application resource files, just as you do with ordinary DECwindows bitmap fonts. To specify the XLFD font name of an outline font, you can replace the fields currently marked with 0 (zero) with the following information: 1. Field 1 — The font height in number of dots. Usually, an asterisk is entered in this field. 2. Field 2 — The font height in point size. For example, you can enter 240 to specify a 24 point font. 3. Fields 3 and 4 — The X- and Y-resolution. Usually, they have the value of 75 or 100. 5–4 Tru64 UNIX Technical Reference for Using Thai Features 4. Field 5 — The average font width in point size. Usually, an asterisk is put in this field. For example, if you want to use a 48 point font of the AngsanaUPC family in bold-italic style for a 100 dpi display device, you would specify: -upc-angsana-bold-i-normal--*-480-100-100-p-*-tis620.2533-1 Table 5–4: XLFD of Thai Outline Fonts Outline Font XLFD Font Name AngsanaUPC-Bold -upc-angsana-bold-r-normal--0-0-0-0-p-0-tis620.2533-1 AngsanaUPC-BoldItalic -upc-angsana-bold-i-normal--0-0-0-0-p-0-tis620.2533-1 AngsanaUPC-Italic -upc-angsana-medium-i-normal--0-0-0-0-p-0-tis620.2533-1 AngsanaUPC-Light -upc-angsana-medium-r-normal--0-0-0-0-p-0-tis620.2533-1 CordiaUPC-Bold -upc-cordia-bold-r-normal--0-0-0-0-p-0-tis620.2533-1 CordiaUPC-BoldItalic -upc-cordia-bold-i-normal--0-0-0-0-p-0-tis620.2533-1 CordiaUPC-Italic -upc-cordia-medium-i-normal--0-0-0-0-p-0-tis620.2533-1 CordiaUPC-Light -upc-cordia-medium-r-normal--0-0-0-0-p-0-tis620.2533-1 EucrosiaUPC-Bold -upc-eucrosia-bold-r-normal--0-0-0-0-p-0-tis620.2533-1 EucrosiaUPC-BoldItalic -upc-eucrosia-bold-i-normal--0-0-0-0-p-0-tis620.2533-1 EucrosiaUPC-Italic -upc-eucrosia-medium-i-normal--0-0-0-0-p-0-tis620.2533-1 EucrosiaUPC-Light -upc-eucrosia-medium-r-normal--0-0-0-0-p-0-tis620.2533-1 FreesiaUPC-Bold -upc-freesia-bold-r-normal--0-0-0-0-p-0-tis620.2533-1 FreesiaUPC-BoldItalic -upc-freesia-bold-i-normal--0-0-0-0-p-0-tis620.2533-1 FreesiaUPC-Italic -upc-freesia-medium-i-normal--0-0-0-0-p-0-tis620.2533-1 FreesiaUPC-Light -upc-freesia-medium-r-normal--0-0-0-0-p-0-tis620.2533-1 IrisUPC-Bold -upc-iris-bold-r-normal--0-0-0-0-p-0-tis620.2533-1 IrisUPC-BoldItalic -upc-iris-bold-i-normal--0-0-0-0-p-0-tis620.2533-1 IrisUPC-Italic -upc-iris-medium-i-normal--0-0-0-0-p-0-tis620.2533-1 IrisUPC-Light -upc-iris-medium-r-normal--0-0-0-0-p-0-tis620.2533-1 JasmineUPC-Bold -upc-jasmine-bold-r-normal--0-0-0-0-p-0-tis620.2533-1 JasmineUPC-BoldItalic -upc-jasmine-bold-i-normal--0-0-0-0-p-0-tis620.2533-1 JasmineUPC-Italic -upc-jasmine-medium-i-normal--0-0-0-0-p-0-tis620.2533-1 JasmineUPC-Light -upc-jasmine-medium-r-normal--0-0-0-0-p-0-tis620.2533-1 KodchiangUPC-Bold -upc-kodchiang-bold-r-normal--0-0-0-0-p-0-tis620.2533-1 KodchiangUPC-BoldItalic -upc-kodchiang-bold-i-normal--0-0-0-0-p-0-tis620.2533-1 KodchiangUPC-Italic -upc-kodchiang-medium-i-normal--0-0-0-0-p-0-tis620.2533-1 KodchiangUPC-Light -upc-kodchiang-medium-r-normal--0-0-0-0-p-0-tis620.2533-1 LilyUPC-Bold -upc-lily-bold-r-normal--0-0-0-0-p-0-tis620.2533-1 Tru64 UNIX Technical Reference for Using Thai Features 5–5 LilyUPC-BoldItalic -upc-lily-bold-i-normal--0-0-0-0-p-0-tis620.2533-1 LilyUPC-Italic -upc-lily-medium-i-normal--0-0-0-0-p-0-tis620.2533-1 LilyUPC-Light -upc-lily-medium-r-normal--0-0-0-0-p-0-tis620.2533-1 WaterlilyUPC-Bold -upc-waterlily-bold-r-normal--0-0-0-0-p-0-tis620.2533-1 WaterlilyUPC-BoldItalic -upc-waterlily-bold-i-normal--0-0-0-0-p-0-tis620.2533-1 WaterlilyUPC-Italic -upc-waterlily-medium-i-normal--0-0-0-0-p-0-tis620.2533-1 WaterlilyUPC-Light -upc-waterlily-medium-r-normal--0-0-0-0-p-0-tis620.2533-1 YuccaUPC-Bold -upc-yucca-bold-r-normal--0-0-0-0-p-0-tis620.2533-1 YuccaUPC-BoldItalic -upc-yucca-bold-i-normal--0-0-0-0-p-0-tis620.2533-1 YuccaUPC-Italic -upc-yucca-medium-i-normal--0-0-0-0-p-0-tis620.2533-1 YuccaUPC-Light -upc-yucca-medium-r-normal--0-0-0-0-p-0-tis620.2533-1 5.3 Outline Font Samples Figures 5-2 through 5-11 illustrate samples of Thai outline fonts. Figure 5–2: AngsanaUPC Font Sample Figure 5–3: CordiaUPC Font Sample 5–6 Tru64 UNIX Technical Reference for Using Thai Features Figure 5–4: EucrosiaUPC Font Sample Figure 5–5: FreesiaUPC Font Sample Figure 5–6: IrisUPC Font Sample Tru64 UNIX Technical Reference for Using Thai Features 5–7 Figure 5–7: JasmineUPC Font Sample Figure 5–8: KodchiangUPC Font Sample Figure 5–9: LilyUPC Font Sample 5–8 Tru64 UNIX Technical Reference for Using Thai Features Figure 5–10: WaterlilyUPC Font Sample Figure 5–11: YuccaUPC Font Sample Tru64 UNIX Technical Reference for Using Thai Features 5–9 6 Keyboards The Tru64 UNIX operating system software supports the following Thai keyboard types: • LK201-T • LK401-T • LK443-T • PCXAL 6.1 Keyboard Layout The figures in this chapter show the keyboard layouts for the Thai input methods. You can find online copies of these figures at the locations specified. These figures are in .ddif format. Tru64 UNIX Technical Reference for Using Thai Features 6–1 Figure 6-1: LK201-T Keyboard Layout Required Keymap: thai lk201t Mode: Thai Mode (Gatemanee keyboard used in VT382-T) Location of File: /usr/lib/cda/thai-lk201t-100.ddif Figure 6-2: LK401-T Keyboard Layout Required Keymap: thai lk201wtt Mode: Thai Mode (Gatemanee keyboard used in VT382-T) Location of File: /usr/lib/cda/thai-lk401t-100.ddif 6–2 Tru64 UNIX Technical Reference for Using Thai Features Figure 6-3: LK201-WTT Keymap Layout Required Keymap: thai lk201wtt Mode: Thai Mode (defined in WTT V2.0) Location of File: /usr/lib/cda/thai-lk201wtt-100.ddif Figure 6-4: LK401-WTT Keymap Layout Required Keymap: thai lk401wtt Mode: Thai Mode (defined in WTT V2.0) Location of File: /usr/cda/thai-lk401wtt-100.ddif Tru64 UNIX Technical Reference for Using Thai Features 6–3 6.2 Keyboard Indicator If you are using XDM, the keyboard indicator (kb_indicator) is automatically activated by the session manager and controls the compose lamp of the Thai keyboards. To start the keyboard indicator, the following command has been added to Automatic Startup menu of Session Manager: "/usr/bin/X11/kb_indicator -map" Compose status is displayed in the keyboard indicator window. A button in the keyboard indicator window controls the compose mode like the compose key on the keyboard. If you are using CDE, you can manually execute the preceding command, or add it to your personal profile. 6–4 Tru64 UNIX Technical Reference for Using Thai Features 7 Thai Input Methods This chapter explains how to implement Thai input methods with different types of applications, introduces the different input methods, and describes the input sequence checking modes that are provided with the Tru64 UNIX operating system software. The input methods for entering Thai characters include: • Thai input mode • Hexadecimal input • Special Thai character input The input sequence checking modes provided with the Tru64 UNIX operating system are: • No input sequence check (NISC) mode/passthrough mode • VT382-T input sequence check (ISC) mode • WTT basic mode (mode 1) • WTT strict mode (mode 2) 7.1 Character–Cell Terminal Applications For character-cell terminal applications, Thai input methods are implemented by the firmware of the VT382-T Thai terminal or incorporated in the terminal emulation software, such as Thai DECterm. Applications need not provide code to handle the input of Thai characters; they can rely on the VT382-T terminal or Thai DECterm to provide the input method services. Thai DECterm can be regarded as one of the DECwindows Motif applications. Therefore, the activating and deactivating methods follow those of DECwindows Motif, as discussed in Section 7.2. Tru64 UNIX Technical Reference for Using Thai Features 7–1 For VT382-T terminals, the input mode can be selected using the [Thai] key, which is equivalent to the [Compose] key on a standard LK201 keyboard or the [Left-Compose] key on a standard LK401 keyboard. On the Thai version of the LK201 or LK401 keyboard (LK201-T or LK401-T) the [Thai] key is labeled in Thai. After the Thai input mode is activated, the firmware of the VT382-T terminal or the input methods incorporated in Thai DECterm allow for entering Thai characters and return the input data as appropriate. 7.2 DECwindows Motif and CDE Applications The X Window System provides a mechanism for associating encodings of symbols which are usually printed on keycaps (called KeySyms) with physical or logical keys. Each key is associated with a list of KeySyms. Depending on the Shift/Lock state, different KeySyms are obtained by pressing the same key. For instance, in the case of U.S. English keyboard, the input of "3" or "#" is switched by the shift state. The standard mechanism for supporting two KeySyms per key was established in Release 3 of the X Window System. This support is insufficient for some languages, such as Hebrew and Thai, which require more KeySyms in order to support the native languages. In Relese 4, the Mode Switch mechanism was introduced to allow switching of Group 1 and Group 2 characters, where Group 1 is ASCII KeySyms and Group 2 is native language characters. The Mode Switch mechanism works as a Group Shift key for these languages. In addition, you can input different sets of characters through the same keyboard by changing the associated KeySyms. In the X Consortium's release of X Window System, the Mode Switch On state is effective only for entering one single character. After the character is entered, the Mode Switch state is reset. In the Tru64 UNIX implementation, the Mode Switch mechanism is enhanced to support both single-shot switching and locking-shift switching, depending on the keymap definition. In the latter case, when the Mode Switch state is set, it remains unchanged until the Mode Switch key is pressed again to modify the state. _____________________________ Note____________________________ On Tru64 UNIX operating system servers, a locking "mode switch" mechanism is used to switch between the Thai and English input modes. On servers where the locking "mode switch" is absent, the Thai input mode can still be entered by pressing the key corresponding to the XK_Multi_key KeySym. In contrast to the locking "mode switch" mechanism, the XK_Multi_key affects one input context only. ______________________________________________________________ For setting Thai KeySyms, DECwindows Motif provides the keymaps shown in Table 7-1. 7–2 Tru64 UNIX Technical Reference for Using Thai Features Table 7–1: Thai Keymaps Keymap Keyboard thai lk201t LK201-T thai lk201wtt LK201-T thai lk401t LK401-T thai lk401wtt LK401-T thai lk443t LK443-T thai lk443wtt LK443-T thai pcxalt PCXAL-T thai pcxalwtt PCXAL-T The keymaps in Table 7-1 support locking-shift mode switching. With these keymaps, you can enter English characters in the Mode Switch Off state and Thai characters in the Mode Switch On state. The effect of setting the Mode Switch on is similar to that of entering the Thai input mode on the VT382-T terminal. 7.2.1 Loading Keymaps The procedures for activating the Thai input mode on VT terminals, DECwindows Motif, or CDE are similar. You need to load a Thai keymap in order to input Thai characters on DECwindows Motif and CDE; for VT terminals, you can skip this step. If you are using XDM to load a Thai keymap, choose the Keyboard... menu item from the Customize menu of the Session Manager. The Keyboard dialog box is displayed and you can choose the Thai keymap associated with the keyboard connected to your workstation. For instance, if you have a Thai LK401-T keyboard and you want to use the Gatemanee layout, you would choose "thai lk401t". If you are using CDE, you can load the Thai keymaps by clicking the keyboard options in Application Manager. The keymap is a global attribute to a display device. After you select a keymap, the keymap is effective to all client applications running on your display device. If you plan to run applications in different languages, you should check to determine if there are conflicts between the keymap that you are using and the keymap required by those languages. Tru64 UNIX Technical Reference for Using Thai Features 7–3 7.3 Input Methods 7.3.1 Thai Character Input To input Thai characters, switch the input mode to Thai. In this mode, you can input Thai characters by pressing keys on the main keyboard. On a Thai keyboard, the Thai characters are printed on the right-hand side of the keycaps. See Chapter 6 for illustrations of the Thai Keyboard layouts. The key sequences for activating the Thai input mode are shown in Table 7-2. Table 7–2: Thai Input Invocation Key Keyboard Types Thai Key Sequence VT Terminals [Thai] DECwindows Motif LK201-T [Thai/Space] LK401-T [Thai] You can press the appropriate Thai key sequence to toggle between the English input mode and the Thai input mode. 7.3.2 Special Thai Characters Input Most Thai characters defined in Thai Industrial Standard (TIS) 620-2533 are found on the keycaps of the main keyboard; you enter them directly by pressing the respective keys. However, there are 7 Thai characters which do not appear on the supported keyboard layouts. To enter these characters, you can use Special Thai character input method or hexadecimal input method. 7.3.2.1 Special Thai Character Input Method You can enter the special characters in Thai input mode by pressing designated keys while holding down the [Shift/Thai] key on a LK201-T keyboard or the [Shift/Alt] key on a LK401-T keyboard. The special characters, designated keys, and keyboards are listed in Table 7-3. 7–4 Tru64 UNIX Technical Reference for Using Thai Features Table 7–3: Special Thai Characters Input Method Character Hex Code Designated Key LK201 LK401 KHO KHUAT A3 KHO KHAI [Shift/Thai/-] [Shift/Alt/-] KHO KHON A5 KHO KHWAI [Shift/Thai/8] [Shift/Alt/8] LAKKHANGYAO E5 SARA AA [Shift/Thai/K] [Shift/Alt/K] YAMAKKAN EE SARA AM [Shift/Thai/E] [Shift/Alt/E] FONGMAN EF MAIYAMOK [Shift/Thai/Q] [Shift/Alt/Q] ANGKHANKHU FA NO NU [Shift/Thai/O] [Shift/Alt/O] KHOMUT FB PHO PHUNG [Shift/Thai/Z] [Shift/Alt/Z] ______________________________ Note ___________________________ The Special Thai Character Input method cannot be used in English input mode. ______________________________________________________________ 7.3.2.2 Hexadecimal Input Method You can enter special Thai characters by specifying their hexadecimal (Hex) codes. On a VT382-T Thai terminal, you invoke the Hex input mode by pressing [Ctrl/Thai], then releasing it. For DECwindows Motif, you invoke the Hex input mode by pressing and releasing [Ctrl/Thai] on an LK201-T keyboard or [Ctrl/Alt] on an LK401-T keyboard. ______________________________ Note ___________________________ You can invoke Hex input mode either from English input mode or Thai input mode. ______________________________________________________________ Once in Hex input mode, you input a two-digit hexadecimal code to enter a special character. For example, if you want to enter the Thai character FONGMAN (EF), press: [Ctrl/Thai] [E] [F] After the hexadecimal code is entered, you exit Hex input mode. You must reactivate Hex input mode to enter another hexadecimal code. Hexadecimal codes for special Thai characters are shown in Table 7-3. Tru64 UNIX Technical Reference for Using Thai Features 7–5 7.3.3 English Character Input To input English characters, set Thai mode to off. In this mode, you can input English letters, numeric characters, and punctuation marks by pressing keys on the main keyboard. On a Thai keyboard, the characters or symbols are printed on the left side of the keycaps. 7.4 Input Sequence Check Modes The Tru64 UNIX operating system software supports the following Thai input sequence check modes: • NISC Mode/Passthrough mode • VT382-T Input Sequence Check (ISC) mode • WTT Basic mode (Mode 1) • WTT Strict mode (Mode 2) 7.4.1 Selecting Input Sequence Check Mode The way you select input sequence check mode depends on whether you are using DECwindows Motif or running character-cell terminal applications. 7.4.1.1 DECwindows Motif In DECwindows Motif, you can select an input sequence check mode in one of two ways: • Setting the XMODIFIERS environment variable • Specifying the parameter in the R6 Xlib XsetLocaleModifiers function Table 7-4 shows the value of the XMODIFIERS parameter that you set for the various input sequence check modes. Table 7–4: Thai Input Sequence Check Modes Input Sequence Check Mode XMODIFIERS NISC/Passthrough @im=Pasthrough VT382-T ISC @im=VT382T WTT Basic @im=BasicCheck WTT Strict @im=Strict By default, the input mode is WTT Basic mode. 7–6 Tru64 UNIX Technical Reference for Using Thai Features For example, you can start Cardfiler in WTT Strict mode and Calendar in Passthrough mode with the following script: #! /usr/bin/sh # # Please uncomment the following lines to # make sure the session is in proper # language. # # echo "*xnlLanguage:\tth_TH.TACTIS" | \ # /usr/bin/X11/xrdb -merge # [email protected]=Strict export XMODIFIERS /usr/bin/X11/dxcardfiler & # # [email protected]=Passthrough export XMODIFIERS /usr/bin/X11/dxcalendar & # # 7.4.1.2 Character-Cell Terminal Applications For Thai DECterm, you can select the Thai input sequence mode through the General Option... dialog box. For details, see Chapter 9. For VT382-T Thai terminal, the Passthrough mode and the VT382-T Input Sequence Check mode are supported by the terminal itself. You can select one of these input modes through the terminal's Setup menu. The other two input sequence check modes, WTT Basic and WTT Strict, can be supported through the Thai terminal driver. By default, the input sequence check mode is set to WTT Basic mode. To switch the input sequence check mode, you can use the following command: % stty isc <mode> The <mode> variable can be: • 0 for Passthrough mode • 1 for WTT Basic mode • 2 for WTT Strict mode For the details about the Thai terminal driver, see Chapter 9. Tru64 UNIX Technical Reference for Using Thai Features 7–7 _____________________________ Note____________________________ The input sequence checking mechanism supported by the Thai terminal driver is disabled in the CBREAK or RAW mode. For details, see the cbreak and raw reference pages. ______________________________________________________________ 7.4.2 NISC Mode/Passthrough Mode In this mode, Thai characters can be entered in arbitrary order. No checking is performed on the sequence of input data. This input mode provides more freedom for applications to handle input data by themselves. However, data can be entered in invalid order and applications need to handle it properly. 7.4.3 VT382–T ISC Mode Thai characters of different display levels can be combined in six valid patterns, as shown in Figure 7-1. Figure 7-1: Valid Patterns of Thai Character Composition Entering combinations other than these patterns will not produce correct Thai script writing syntax, and a warning bell will ring to signify possible typographical errors. The VT382-T ISC algorithm checks only the combination of Thai characters; not their order. The following data sequences represent the same character sequence and their appearance on screen is identical: 7–8 Tru64 UNIX Technical Reference for Using Thai Features The rule is that base level characters are entered first. They are used as delimiters for character columns. The order of other characters in the same column does not matter. To simplify the implementation, a lookup table, Table 7-5, is used to determine the valid combinations of Thai characters. Tru64 UNIX Technical Reference for Using Thai Features 7–9 Table 7–5: VT382-T ISC Mode Lookup Table C N O O N C L T F F F T B B V V V R V V B O A A A A A A N D D D V V V N S V 1 2 3 L 1 2 D E 1 2 3 1 2 3 NON A A A A A A X R R R R R R R R R R CONS A A A A A A X C C C C C C C C C C LV A A A A A A X R R R R R R R R R R FV1 A A A A A A X R R R R R R R R R R FV2 A A A A A A X R R R R R R R R R R FV3 A A A A A A X R R R R R R R R R R CTRL A A A A A A X R R R R R R R R R R BV1 A A A A A A X R R R C C R R R R R BV2 A A A A A A X R R R C R R R R R R BD A A A A A A X R R R R R R R R R R TONE A A A A A A X C C R R R R R C C C AD1 A A A A A A X C R R R R R R C R R AD2 A A A A A A X R R R R R R R R R C AD3 A A A A A A X R R R R R R R R R R AV1 A A A A A A X R R R C C R R R R R AV2 A A A A A A X R R R C R R R R R R AV3 A A A A A A X R R R C R C R R R R * Vertical - leading byte Horizontal - following byte Value Meaning Where to display A Accept Next display cell C Accept & Compose Same display cell R Reject — X Accept but not Display — 7–10 Tru64 UNIX Technical Reference for Using Thai Features ______________________________ Note ___________________________ The VT382-T Thai terminal supports an older version of TIS 620, namely TIS 6202529. In TIS 620-2529, the character YAMAKKAN is classified as a base level character and its behavior is different from that described in this table. ______________________________________________________________ 7.4.4 WTT Basic Mode The WTT Basic mode is similar to the VT382-T ISC mode, but it is stricter. It accepts Thai data entered in only the following sequences: • L3L2L1 (base level, upper level and then top level) • L3L4L1 (base level, lower level and then top level) Data in the following sequences is not allowed: • L3L1L2 (base level, top level and then upper level) • L3L1L4 (base level, top level and then lower level) In the Tru64 UNIX operating system, WTT Basic is the default input sequence check mode. For details, see Table 7–6. 7.4.5 WTT Strict Mode In addition to the combinations rejected by the WTT Basic mode, the WTT Strict mode adds more conditions to eliminate illegal input sequences. The WTT Strict mode can further improve the correctness of input data. For details, see Table 7–6. Tru64 UNIX Technical Reference for Using Thai Features 7–11 Table 7–6: WTT ISC Mode Lookup Table C N O O N C L T F F F T B B V V V R V V B O A A A A A A N D D D V V V N S V 1 2 3 L 1 2 D E 1 2 3 1 2 3 NON A A A S S A X R R R R R R R R R R CONS A A A A S A X C C C C C C C C C C LV S A S S S S X R R R R R R R R R R FV1 A A A A S A X R R R R R R R R R R FV2 A A A A S A X R R R R R R R R R R FV3 A A A S A S X R R R R R R R R R R CTRL A A A A A A X R R R R R R R R R R BV1 A A A A S A X R R R C C R R R R R BV2 A A A S S A X R R R C R R R R R R BD A A A S S A X R R R R R R R R R R TONE A A A A A A X R R R R R R R R R R AD1 A A A S S A X R R R R R R R R R R AD2 A A A S S A X R R R R R R R R R R AD3 A A A S S A X R R R R R R R R R R AV1 A A A S S A X R R R C C R R R R R AV2 A A A S S A X R R R C R R R R R R AV3 A A A S S A X R R R C R C R R R R * Vertical - leading byte Horizontal - Following byte _____________________________ Note____________________________ The values highlighted in Table 7-6 have been modified since the original WTT input sequence checking table. ______________________________________________________________ 7–12 Tru64 UNIX Technical Reference for Using Thai Features Value Meaning Basic A Accept C Accept & Compose S Strict Mode Reject R Reject X Accept but not display Strict Where to display Accept Accept Next display cell Accept Accept Same display cell Accept Reject Next display cell Reject Reject — Accept Accept — Tru64 UNIX Technical Reference for Using Thai Features 7–13 8 Thai Printing Support This chapter introduces the Thai printing support provided by the Tru64 UNIX operating system. It describes the supported printers, the print file formats, printing features, and the maintenance procedures for supporting Thai printing. 8.1 Supported Printers The Tru64 UNIX operating system supports text printers with built-in Thai fonts. The Thai text printing support follows the Wototo (WTT) specification. The Tru64 UNIX operating system supports Thai printing on PostScript printers in three ways: • Using the built-in or downloaded fonts installed in printers • Using the font faulting mechanism for certain PostScript printers, which is explained in Section 8.3 • Using the wwpsof print filter. For information on the supported printer types and print filters, see Chapter 4, Local Language Devices. 8.2 Print File Formats The Tru64 UNIX operating system supports printing of mixed ASCII and Thai characters in the following print file formats: • Plain text files on text printers and PostScript printers • Files with nroff control sequences (for printing with underline, superscript, subscript and bold attributes) on text printers and PostScript printers • PostScript files on PostScript printers Tru64 UNIX Technical Reference for Using Thai Features 8–1 The print filters for PostScript printers can automatically detect the format of a print file and convert it to the proper format for printing. 8.3 Printing Features The Tru64 UNIX operating system supports the printing features described in the following sections. 8.3.1 Font Faulting Font faulting is a mechanism for saving memory required by fonts. With font faulting, font information is stored in either: • The secondary storage of a supporting host machine, called a font-faulting server • An internal font disk The font information is loaded into the printer on demand, thus conserving printer memory. The font-faulting mechanism is useful in a desktop printing environment, where a large number of different fonts is required. In this case, simultaneously storing all the fonts reduces the available memory, and therefore speed, of the printer. It is also possible that the number of required fonts is so large that all fonts cannot be stored in memory at the same time. Font faulting for single-byte fonts is done on a per font basis. Single-byte fonts are small and relatively simple, so loading the whole font is efficient. The font-faulting mechanism can be used with the following printers: • DEClaser 1152 • DEClaser 5100 • PrintServer 17 See Section 8.5, Setting Up Thai Printing, for information about configurating these printers. 8.3.2 Font Preloading The generic wwpsof PostScript print filter preloads the font data required by a print job, along with the print job itself, to the printer. Therefore, a job printed with the wwpsof print filter might consume more printer memory and print slower than a job printed using the font faulting mechanism. However, using the wwpsof printer allows you to print Thai characters on all available PostScript printers rather than just a few. See Section 8.5, Setting Up Thai Printing, for information about configuring the wwpsof filter. 8–2 Tru64 UNIX Technical Reference for Using Thai Features 8.3.3 Outline Fonts The Tru64 UNIX operating system provides a large set of outline fonts for printing files in various languages. Depending on how many local language support subsets are installed on your system, more than 150 outline fonts may be available. The outline font for Thai printing is described in detail in Chapter 5. 8.3.4 Printer ID for DOT Matrix Printers Different Thai dot matrix printers may support different internal codes for Thai printing. To ensure the internal code of a printer can be set up correctly, you must specify the printer ID (that is, the model and brand registration ID) through the yp parameter in the /etc/printcap file. The format of printer ID follows the WTT specification: [bb][mm][nn] where bb is the Brand ID representing the brand name of the printer mm is the Model ID representing its model number nn is the Printer Code ID specifying the internal character code The details of the registered printer ID can be found in the WTT specification. For each supported printer code, a mapping table is provided to convert the print file code to the printer codes. The code conversion tables are stored in the following location: /usr/lbin/tac_data/tac11xnn.cod where nn is one of the valid Printer Code IDs. 8.3.5 Control Sequence for Dot Matrix Printers To support the printing of text files with nroff control sequences on a Thai dot matrix printer, the generic text print filter, thailpof, reads the printer description table of the printer and generates the appropriate control sequences. Printer description tables are stored in the following location: /usr/lbin/tac_data/bbmm.tab where bb is the Brand ID and mm is the Model ID. Alternatively, you can specify other character code tables by passing the tacdata=<tac data path> option to the lpr command through the -A flag. A printer description table describes the escape sequences used by the printer for printing with the underline, superscript, and subscript attributes. Each line in this table contains an escape sequence name, as defined in Table 8-1, and its escape sequence code (in Tru64 UNIX Technical Reference for Using Thai Features 8–3 hexadecimal). Comments can be added to the table by entering an exclamation mark (!) as the first character in the line. !++ ! printer table : /usr/lbin/tac_data/epb4.tab ! description :escape sequences table for Epson LQ1050+ !subscript 1B 53 31 ! ESC S 1 x_subscript 1B 54 ! ESC T superscript 1B 53 30 ! ESC S 0 x_superscript 1B 54 ! ESC T underline 1B 31 ! ESC 1 x_underline 1B 30 ! ESC 0 reset 1B 40 ! ESC @ Table 8–1: Escape Sequence Names Escape Sequence Name Meaning subscript Subscript starts x_subscript Subscript ends superscript Superscript starts x_superscript Superscript ends underline Underline starts x_underline Underline ends reset Reset printing attributes 8.3.6 Printing Enhancement Rules (Text Morphing) Under certain circumstances, when standard above vowels or tone marks are combined with other Thai characters, they may overlap each other or there may be too much space between them. To support the printing of high quality Thai documents, the Thai outline fonts are specially encoded to include a supplementary set of above vowels and tone marks, in addition to those defined in TIS 620-2533. The printing position of these additional characters is slightly adjusted to handle the spacing problems of certain combinations of Thai characters. During printing, the above vowels or tone marks defined in TIS 620-2533 are mapped, according to rules, to appropriate characters in the supplementary set, resulting in better print quality. This technology is called text morphing. To enable the text morphing capability, you specify the tm option to the lpr command through the -A flag. 8–4 Tru64 UNIX Technical Reference for Using Thai Features As there is currently no standard way of text morphing, the set of rules supported by the Tru64 UNIX operating system applies only to Thai fonts shipped by HP. If you use Thai fonts from other vendors, carefully verify the output from the print queue with text morphing before making the printer available to all users. 8.3.7 Space Compensating Many English character-cell terminal applications cannot properly handle non-spaced Thai characters. The problem is severe when Thai text needs to be aligned in columns with spaces between them. The space compensating mode addresses this problem. For details, see section 9.2.8, Thai Character Output. The Tru64 UNIX operating system supports space compensating mode for printing Thai text files. By default, the space compensating mode is disabled. To enable the space compensating mode for printing, you can specify the spcom option to the lpr command by using the -A flag. 8.3.8 Half–Height Printing For those Thai text printers which support three-pass printing, Thai characters of different display levels are printed on three separate lines. The Tru64 UNIX operating system allows you to print the three output levels in a more compact region, occupying only 1.5 lines. This is called half-height printing. To enable the half-height printing capability, you can specify the onehalf option to the lpr command by using the -A flag. 8.4 Commands and Daemons Before you configure printers to utilize the printing features supported by the Tru64 UNIX operating system, you should understand some commands and daemons used in print configuration. This section discusses them in detail; the next section illustrates how they are used for configuration. 8.4.1 Country-Specific Options to the lpr command In addition to the usual options to the lpr command, the -A option is added to pass the country-specific parameters. You can also use ya to set these parameters in the /etc/printcap file. For example, the parameters can be specified with the -A option as: % lpr -A "flocale=th_TH font=LilyUPC-Light plocale=th_TH" <file> The same set of parameters, when defined in the /etc/printcap file appear as follows: :ya="flocale=th_TH font=LilyUPC-Light plocale=th_TH":\ Tru64 UNIX Technical Reference for Using Thai Features 8–5 If you supply parameters using the -A option to the lpr command, they override the corresponding default values in the /etc/printcap file. The following parameters are applicable to Thai printing: • flocale=<any valid locale> Specifies the locale for the source text file. The printer filters use this locale to validate the characters inside the source text file. If this value is not set properly, the text will be interpreted using the current locale. In the Thai printing environment, this value is particularly important in order for the lpr command to correctly interpret the characters. • plocale=<any valid locale> Specifies the locale for the printer. If the printer has built-in fonts, the plocale value should match the codeset of the built-in fonts. If the printer uses the font faulting mechanism, the value of plocale should match the font used to print the text file. • font=<supported outline font> Specifies the font name for printing the source text files in a PostScript printer. This is valid for printing text files only; PostScript files are tagged with the required font name. • spcom Enables space-compensation mode. In Thai, nonspacing characters can combine with other characters for display and therefore do not occupy space. Many of the tools for text alignment do not properly handle nonspacing characters. If you want to print Thai output from such utilities, you must enable space compensation mode to ensure proper text alignment. Space compensation is done line by line. The print filter counts of the number of nonspacing characters found in a line. When two or more consecutive spaces are encountered, the print filter inserts the appropriate number of spaces, thereby compensating for spaces added by the nonspacing characters. • tm Enables text morphing for Thai printing. Text morphing replaces some characters with others to produce better output in desktop publishing environments. Text morphing rules are proprietary to fonts. Therefore, text morphing is supported only by Tru64 Thai outline fonts and is available only for PostScript printing. 8–6 Tru64 UNIX Technical Reference for Using Thai Features • onehalf Enables half-height printing. When enabled, Thai characters are printed on one and a half lines, rather than on three lines, to produce more compressed and natural-looking output. This option, however, slows down the printing speed. The onehalf option works only with the thailpof print filter. • tacdata=<tac data path> Specifies where the character code and control sequence tables for the printer are located. The printer ID that follows the Wototo specification specifies the table to be used. The yp value in the /etc/printcap file defines the printer ID. The default path is /usr/lbin/tac_data. • line=<number of lines> Specifies the number of lines per page. When used with the -w command, this option can be used to control the font size and orientation of the output. 8.4.2 PostScript Font Management Utility (pfsetup) A PostScript font management utility, pfsetup, is provided for setting up print queues to use the font faulting mechanism. This utility has the following syntax: pfsetup [-s] [-d] [queue_name...] The options to the pfsetup command are defined as follows: • The -s (setup mode) option allows you to setup lists of fonts to be downloaded. • The -d (download mode) option downloads fonts to printers according to the lists prepared with the -s option. If you do not specify an option, pfsetup displays the information about the print queues that have been set up with this utility. If you do not specify a particular queue name, pfsetup processes every applicable queue. In setup mode, pfsetup displays all PostScript printer fonts available on the system and prompts you to select the fonts or font headers to be downloaded onto individual print queues. For example: % /usr/sbin/pfsetup -s ====================================================== Printer queue: lp1 | 1 | d11152W No font has been setup for downloading in queue lp1 Tru64 UNIX Technical Reference for Using Thai Features 8–7 These are fonts available in your system for downloading. Fonts chosen for downloading are marked with * 1 Hei-Light-CNS11643 3 Hei-GB2312-80 5 Munjo 7 [email protected] 9 AngsanaUPC-Light 11 CordiaUPC-BoldItalic 13 CordiaUPC-Light 15 EucrosiaUPC-BoldItalic 17 EucrosiaUPC-Light 19 FreesiaUPC-BoldItalic 21 FreesiaUPC-Light 23 IrisUPC-BoldItalic 25 IrisUPC-Light 2 4 6 8 10 12 14 16 18 20 22 24 26 Sung-Light-CNS11643 XiSong-GB2312-80 [email protected] AngsanaUPC-Italic CordiaUPC-Bold CordiaUPC-Italic EucrosiaUPC-Bold EucrosiaUPC-Italic FreesiaUPC-Bold FreesiaUPC-Italic IrisUPC-Bold IrisUPC-Italic JasmineUPC-Bold [C]ontinue | [S]etup | [L]ist fonts | [Q]uit | [N]ext queue <C> In this example, the action keys are defined as follows: Key Action [C]ontinue Display a further font listing [S]etup Proceed to setup [L]ist fonts List fonts again [Q]uit Quit pfsetup [N]ext queue Proceed to the next queue If you choose the s option, the following prompt is displayed: [A]dd fonts | [R]emove fonts | [L]ist fonts | [Q]uit | [N]ext queue <N> In response to the prompt, you can enter a to add fonts to or r to delete fonts from the list for a print queue. The fonts that you select will be highlighted with an asterisk (*) at the end of the font names. _____________________________ Note____________________________ The fonts on this list vary according to the language variants that are installed on your system. ______________________________________________________________ 8–8 Tru64 UNIX Technical Reference for Using Thai Features To download the fonts selected in setup mode, you can use the pfsetup utility with the -d option. 8.4.3 Font Faulting Daemon (ffd) Font faulting requests from a PostScript printer with the two channel approach, such as a DEClaser 1152, require that the font faulting daemon, ffd, be running on your system. When the ffd daemon receives a font data request, it extracts the required font glyph data from the specified font and sends it to the printer through the secondary channel. The ffd daemon ensures that all fonts in the font faulting server are available to the printer. If you configure a print queue that makes use of the two channel approach, or if you modify the secondary channel of a print queue, you must restart the font faulting daemon. To restart the font faulting daemon, you must log in as root and stop the existing font faulting daemon by entering the following command: % /sbin/init.d/ffserver stop To start the font faulting daemon, you can enter: % /sbin/init.d/ffserver 8.4.4 PrintServer Printing Command (wwlpspr) To fully utilize the features of PrintServer 17 such as two-sided printing and multiple pages per side, it is necessary to use the lpspr command provided by the PrintServer Software Version 5.0 or higher for Tru64 UNIX. This command, however, does not provide features such as locales and fonts for printing text files. To facilitate printing files to PrintServer 17, a unified wwlpspr command is provided in the Tru64 UNIX operating system. The wwlpspr command is a front end program to parse the parameters passed by users and then call different commands such as print filter, lpr, and lpspr with the appropriate command, thus provides a unified interface. For detailed information on the wwlpspr command, refer to wwlpspr(1). 8.5 Setting Up Thai Printing This section describes how to set up the following printers: • Thai Epson LQ1050+ • Declaser 1152 • DEClaser 5100 • Printserver 17 • PostScript printers using wwpsof filter Tru64 UNIX Technical Reference for Using Thai Features 8–9 8.5.1 Thai Epson LQ1050+ To configure the Thai Epson LQ1050+ dot matrix printer: 1. Invoke lpsetup and select the ep1050+ printer. lprsetup ep1050+ The following prompt is displayed: Do you print nonAscii characters on the flag pages? [n] 2. Answer y if you want to print Thai characters on the flag page and n if you do not. The data printed on the flag page includes the file names, user login name, date, and son on. If you are using Thai characters in these values, you should answer y. In this case, the flag page is printed in more than one page, because every character will occupy 1.5 or 3 lines depending on whether or not half-height printing is enabled. The following prompt is displayed: Do you want to print every Thai character in 1.5 lines spacing instead of 3 lines in 3 pass mode? [n] 3. Answer y if you want to enable half-height printing and n if you do not. 4. To change other default settings, modify the ya capability after the prompt: Enter symbol name: In response to the prompt: Enter a new value for symbol 'ya'? ["plocale=th_TH"] input the new values. Please do not forget the double quote around the parameters, and copy the values found in the previous prompt 5. You can modify the following options: • spcom -- You can define the queue always enable space compensation mode. This is not advisable, however, because users cannot disable it. • tacdata -- If you want to define your own control sequence or internal code for this printer, you can use this option to point to your own path. 8–10 Tru64 UNIX Technical Reference for Using Thai Features To print Thai text files on this printer, use the lpr command. The thailpof printer filter is generic enough for most dot matrix printers. You can use the preceding procedure to configure another dot matrix printer by defining the appropriate yp value. For advanced tuning, refer to the previous sections on how to define the control sequences and internal codes. 8.5.2 DEClaser 1152 The DEClaser 1152 printer can be used to print Thai characters by using the font faulting mechanism with two communications channels. One channel is for normal data and the second channel is for font faulting data. See Figure 8-1. Figure 8-1: Two-channel Communication of the Font Faulting Mechanism Font faulting requires 4M bytes of printer memory. If your DEClaser 1152 printer has only 2M bytes of memory, you must install the LN07X-UF memory board to provide the additional 2M bytes of memory. Refer to the printer manual for installing the LN07X-UF memory board. You also need to establish one and only one system to be the font-faulting server for the printer. This server sends font information to the printer through a secondary communication interface, or channel. The printer's secondary channel connection to the font-faulting server can be made through either a local port or a Local Area Transport (LAT) port. If the connection is through a LAT port, make sure that no other applications or hosts are using that port. An 8 pin Din to 6 Pos MMJ Adapter (part number: -H8584-AB) is needed to convert the Apple-talk interface on the printer to be the secondary channel used by the font-faulting mechanism. The baud rate of the secondary interface should match the value of the $BAUD parameter in the /sbin/init.d/ffserver file. By default, this value is 9600. Tru64 UNIX Technical Reference for Using Thai Features 8–11 To configure the DEClaser 1152 printer to print Thai files: 1. Add a printer by using the lprsetup command and select dl1152w as the printer type. 2. If this machine is the font faulting server for the printer, answer y to the following question: Do you want to configure this machine as font faulting server for the DEClaser 1152 printer? One and only one font faulting server should be configured for every DEClaser 1152 employing font faulting mechanism. [n] Then, enter the full path name of the port used to connect the secondary channel for the ya capability. 3. Answer y in response to the following question: Do you want to set up the printer codeset or default font for printing non-Ascii text? If your answer is 'y', please consult printcap.4 for the parameters. *** Remember to enclose the parameters with a pair of double quotes. [n] Then, type the following: "plocale=th_TH font=<any Thai font>" Refer to Chapter 5 for list of Thai outline fonts. 4. If you want to change other default values, modify the ya capability after the following prompt: Enter symbol name: Input the new values in response to the following prompt: Enter a new value for symbol 'ya'? ["plocale=th_TH font=LilyUPC-Light"] 8–12 Tru64 UNIX Technical Reference for Using Thai Features Remember to include the double quotation marks around the parameters, and use the same values you entered at the previous prompt. 5. You can modify the following options: • spcom -- You can define that the queue always enable space compensation mode. This is not advisable, however, because users cannot disable it. • tm -- You can define that the queue always enable text morphing. This is not advisable, however, because users cannot disable it. 6. Use the pfsetup command to download the fonts. For greatest efficiency, download the Thai font you specified in Step 3, plus any other frequently used single-byte fonts. The printer can access the fonts that are not manually downloaded, but there is overhead for dynamically downloading fonts. 7. If this machine is configured as the font-faulting host, issue the following commands to notify the font-faulting daemon about the new printer: % /sbin/init.d/ffserver stop % /sbin/init.d/ffserver start You need to enter these commands only after adding or modifying the printer queue. The next time the server is rebooted, the font-faulting daemon will locate the printer automatically. 8. Everytime the font-faulting server or the DEClaser 1152 is restarted, you should use the pfsetup command to download the fonts again. For the details of the font-faulting daemon and the pfsetup utility, see Section 8.4, Commands and Daemons. To print Thai text files to print queues connected to a DEClaser 1152 printer, use the lpr command. You can override the default font setting in the /etc/printcap file by using the -A option to the lpr command. 8.5.3 DEClaser 5100 The DEClaser 5100 printer can be used to print Thai characters using the font-faulting mechanism with built-in hard disk. The model that supports the font faulting-mechanism is the LN90X-HD, which includes the 128 MB hard disk option. The printer also must have at least 6 MB of memory. Tru64 UNIX Technical Reference for Using Thai Features 8–13 To configure the DEClaser 5100 printer to print Thai files: 1. Add a printer by using the lprsetup command and select dl5100w as the printer type. 2. Answer y in response to the following question: Do you want to set up the printer codeset or default font for printing non-Ascii text? If your answer is 'y', please consult printcap.4 for the parameters. *** Remember to enclose the parameters with a pair of double quotes [n] Then, type the following: "plocale=th_TH font=<any Thai font>" Refer to Chapter 5 for list of Thai outline fonts. 3. If you want to change other default values, modify the ya capability after the following prompt: Enter symbol name: Input the new values in response to the following prompt: Enter a new value for symbol 'ya'? ["plocale=th_TH font=LilyUPC-Light"] Remember to include the double quotation marks around the parameters, and to use the same values you entered at the previous prompt. 4. You can modify the following options: • spcom -- You can define that the queue always enable space compensation mode. This is not advisable, however, because users cannot disable it. • tm -- You can define that the queue always enable text morphing. This is not advisable, however, because users cannot disable it. 8–14 Tru64 UNIX Technical Reference for Using Thai Features 5. Use the pfsetup command to download the fonts. Download all fonts that you expect the printer to need, because any fonts not manually downloaded are not accessible to the printer. 6. Downloading a font is done only once, until the font is removed or the hard disk is reformatted. For the details of the pfsetup utility, see section 8.4, Commands and Daemons. To print Thai text files to print queues connected to a DEClaser 5100 printer, use the lpr command. You can override the default font setting in the /etc/printcap file by using the -A option to the lpr command. 8.5.4 PrintServer 17 The PrintServer 17 printer can be used to print Thai characters by using the font-faulting mechanism through the network. There are no special hardware requirements. To configure the PrintServer 17 printer to print Thai files: 1. Install the PrintServer Software Version 5.0 or later for Tru64 UNIX. This is a layered product that must be purchased separately. Refer to the corresponding installation guide for installing and configuring the PrintServer software. 2. If you want to define a default printer codeset or default font to print Thai text, use the lprsetup command or manually update the /etc/printcap file to include the ya option by adding the following: :ya="plocale=th_TH font=<any Thai font>":\ Refer to Chapter 5 for list of Thai outline fonts. 3. If you want to change other default values, modify the ya capability after the following prompt: Enter symbol name: Input the new values in response to the following prompt: Enter a new value for symbol 'ya'? ["plocale=th_TH font=LilyUPC-Light"] Remember to include the double quotation marks around the parameters, and use the same values you entered at the previous prompt. Tru64 UNIX Technical Reference for Using Thai Features 8–15 4. You can modify the following options: • spcom -- You can define that the queue always enable space compensation mode. This is not advisable, however, because users cannot disable it. • tm -- You can define that the queue always enable text morphing. This is not advisable, however, because users cannot disable it. 5. Use the pfsetup command to define the fonts to be downloaded. For greatest efficiency, download the Thai font specified in Step 3, plus other frequently used fonts. The printer can access the fonts that are not manually downloaded, but there is overhead for dynamically downloading fonts. Note that the pfsetup command should be executed in the Configuration Host of the PrintServer printer. After executing the pfsetup command, restart the Management Client to enable the new configuration. Refer to the document on PrintServer Software Version 5.0 or later for Tru64 UNIX for further details. 6. To automatically download the fonts defined in Step 5, turn off the PrintServer 17 printer and then turn it on. 7. When the PrintServer 17 is restarted, the fonts will be downloaded automatically. Hence, the pfsetup command is executed once only as long as the configuration is not modified. For the details of the pfsetup utility, see Section 8.4, Commands and Daemons. To print Thai text files to print queues connected to a PrintServer 17 printer, use the wwlpspr command. You can override the default font setting in the /etc/printcap file by using the -A option to the wwlpspr command. 8.5.5 Using the wwpsof Filter with PostScript Printers To configure a PostScript printer to use the wwpsof filter: 1. Invoke lprsetup or printconfig and select the wwpsof print filter. 2. Enter the printer configuration data needed to set up the print queue. 3. Define the "ya" symbol. The "plocale" option is not required unless the print queue must be configured to print only Thai data files. 4. Optionally, turn on the "spcom" and "tm" options to enable space compensation and text morphing. 8–16 Tru64 UNIX Technical Reference for Using Thai Features 9 Other Thai Features This chapter describes features specific to the Thai locale in Tru64 UNIX that are not described elsewhere. 9.1 Thai Terminal Driver Tru64 UNIX provides a Thai terminal driver to handle Thai character processing in character cell terminal applications. The following features are supported: • Input sequence checking • Thai character reordering • History line editing mechanism To activate the Thai terminal driver, enter the following command: % stty tdec 9.1.1 Input Sequence Checking The Thai terminal driver supports the following input sequence check modes: • Passthrough Mode (Mode 0) • WTT Basic Mode (Mode 1) • WTT Strict Mode (Mode 2) To switch the input sequence check mode, you can use the following command: % stty isc <mode> Tru64 UNIX Technical Reference for Using Thai Features 9–1 In this example, <mode> can name one of the following values: • 0 for Passthrough Mode • 1 for WTT Basic Mode • 2 for WTT Strict Mode For details, see Chapter 7. 9.1.2 Thai Character Reordering The WTT input sequence check modes can only accept Thai data in the following sequences: • L3L2L1 (base level, upper level, and then top level) • L3L4L1 (base level, lower level, and then top level) To provide more freedom to enter Thai data in different orders, such as entering top level (L1) characters before upper level (L2) or lower level (L4) characters, the Thai terminal driver provides a Thai character reordering mechanism. Through this mechanism, you can enter data in arbitrary order and the terminal driver will reorder the data stream before sending it to applications. To activate the Thai character reordering mechanism, enter the following command: % stty reorder To deactivate it, enter the following command: % stty -reorder _____________________________ Note____________________________ This feature is not available in the History mode described in the following section. ______________________________________________________________ 9.1.3 History Mode The Thai terminal driver provides a history mechanism for you to recall and edit a previously entered command. You can use the stty command to activate the history mode and define a hot key (usually a control key sequence) for invoking the history mode. For example, the following command defines the hot key to be [Ctrl/P]: % stty thistory ^P Once the hot key is defined, the Thai terminal driver will keep the history of up to 32 command lines. To invoke the history mode, you can press [Ctrl/P]. 9–2 Tru64 UNIX Technical Reference for Using Thai Features In the history mode, you can use the following control key sequences or arrow keys for editing: Key Sequence Function [Ctrl/A] Moves to the beginning of command line [Ctrl/E] Moves to the end of command line [Ctrl/D] Deletes the whole cell under the cursor [erase] Deletes the character before the cursor [werase] Deletes the word before the cursor ⇑ [up arrow] Recalls the previous command line ⇓ [down arrow] Recalls the next command line ⇐[left arrow] Moves the cursor left by one cell ⇒[right arrow] Moves the cursor right by one cell By default, the designated key sequences for the [erase] and [werase] functions are: • [erase] - Delete • [werase] - [Ctrl/W] ______________________________ Note ___________________________ The history mode is available only when character echoing is turned on. For details, see the stty reference pages. ______________________________________________________________ 9.2 Thai DECterm Thai DECterm is a VT382-T terminal emulator. This section describes the Thai features which are specific to Thai DECterm. For the details about the common features provided by the internationalized DECterm, see Writing Software for the International Market. This section describes the following Thai DECterm features: • How to create a Thai DECterm session • Terminal emulator features • Thai character input and output • Other VT382-T functionalities 9.2.1 Creating a Thai DECterm Window The terminal type that DECterm will emulate is sensitive to the session language. Tru64 UNIX Technical Reference for Using Thai Features 9–3 To create a Thai DECterm window through the Session Manager, you can set the session language to Thai, and then select DECterm from the Applications menu of the Session Manager. Alternatively, you can use the -xnllanguage qualifier to specify the terminal type of the DECterm window to create. To get the Thai DECterm window, enter the following command: % /usr/bin/X11/dxterm -xnllanguage th_TH If you specify an unknown value for the -xnllanguage qualifier, then ISO Latin-1 DECterm is assumed. If no Thai font exists, it defaults to ISO Latin-1 DECterm. The user interface language of Thai DECterm always follows the terminal type. The language is independent of the language selection. 9.2.2 Customizing a Thai DECterm Window You can apply to your Thai DECterm windows any of the customization features that are currently applicable to the ISO Latin-1 DECterm window, except for the customization of the NRCS character sets. Customized features can be saved and restored in the same way as in ISO Latin-1 DECterm. 9.2.3 Font Sizes By selecting the Big Font, Little Font, or Fine Font option from the Window Options dialog box, you can use the 12x24, 8x18, or 7x14 Thai fonts. 9.2.4 Terminal ID You can select the following terminal identifier for Thai DECterm from the General Options dialog box: • VT382 ID 9.2.5 Copying Information You can use the Edit menu to copy information within or between Thai DECterm windows. The Cut-and-Paste operation is enhanced to handle mixed ASCII and Thai characters. 9.2.6 Default Character Set Thai DECterm supports TIS 620-2533 and all character sets supported by ISO Latin-1 DECterm. ISO Latin-1 DECterm uses ISO 8859-1 as the default character set. ISO 8859-1 contains ASCII characters, Latin-letters-with-diacritics, and other symbols used in Western European languages, This can be overridden by other options in the General Options dialog box. For Thai DECterm, the default character set for 8-bit data is TIS 620-2533. 9–4 Tru64 UNIX Technical Reference for Using Thai Features In general, Thai DECterm cannot display a mixture of ISO Latin-1 and Thai characters. If you really want to achieve this function, you can output the data together with the designated character set escape sequences. 9.2.7 Thai Character Input When a Thai DECterm window is created, it is in the English input mode. You can enter Thai characters in Thai DECterm by invoking the Thai input mode as described in Chapter 7. Mixed ASCII and Thai characters can be displayed properly on the Thai DECterm window without any special settings. You can select your desired Input Sequence Check Mode from the General Options dialog box: For the details about input sequence check modes, see Chapter 7. 9.2.8 Thai Character Output Thai DECterm supports two display modes. You can select one of the following display modes from the General Options dialog box: • Normal Operation Mode The normal operation mode displays whatever is received from the host. • Space Compensating Mode The design philosophy of the VT382-T Thai terminal is to build more knowledge about Thai processing into the terminal. Most software packages, as long as they are 8-bit clean, can have Thai language features without reengineering. One of the features is Space Compensating Mode. Tru64 UNIX Technical Reference for Using Thai Features 9–5 When VT382-T receives two consecutive space characters followed by a nonspace1 or an escape sequence, it will: – Calculate the new update position of the screen buffer which is equal to the total number of characters in the logical buffer. – Fill the contents of the screen buffer by inserting spaces between the nonspace cell on the left and the newly calculated screen buffer position, exclusively, such that the length of the logical buffer is equal to that of the screen buffer. – Reformat the current line. Figure 9–1: Space Compensation Mode This output method allows output lines formatted in a tabular fashion to be displayed correctly without software (for example, spreadsheet and database management packages) taking too much care about the spacing of table columns. Thai DECterm also emulates the space compensating mode supported by VT382-T. In addition to the behavior described above, two enhancements have been added: • Users can select any control character in place of the space character for display compensation. For example, if an application formats a table by dividing columns with vertical bars (|), users can specify the control character to be | so that space compensation can be evaluated with respect to the vertical bar characters. • Users can specify the number of control characters to be counted for space compensation. By default, the space compensation control character is the space character (0x20) and the number of control characters is 2. You can modify this parameter from the General Options dialog box. 1 Nonspace characters refer to all characters other than the space character (0x20). Do not confuse them with nonspaced characters which refer to top level, upper level and lower level Thai characters. 9–6 Tru64 UNIX Technical Reference for Using Thai Features 9.2.9 Cursor Movement In Thai DECterm, the actual cursor position on the screen is calculated from the logical buffer pointer. The column number specified by the cursor positioning command is the offset from the beginning of the specified line in the logical buffer. Actual cursor position on the screen will be the corresponding screen position to the character pointed to by the logical buffer pointer. Figure 9–2: Internal Cursor Mode 9.2.10 Other VT382–T Functionalities The following functionalities of VT382-T are also implemented in Thai DECterm: • Display characteristics and capabilities • Text capabilities Tru64 UNIX Technical Reference for Using Thai Features 9–7 • Level 3 terminal compatibility: – VT300 mode – VT100 mode – VT52 mode • ANSI-compatible control functions • Support for Terminal State Interrogation (TSI) • All Thai input methods • Support for the following character sets: – DEC Special Graphics Character Set (line drawing) – DEC Supplemental Character Set – DEC Technical Character Set – ISO Latin-1 Supplemental Character Set – IS 620-2533 • Control Representation mode • Support for sixel graphics • UDK editing function • Thai character display attributes: reverse, underline, bold, blink, double height/width For the details about the VT382-T functionalities, refer to VT382-T Programming Reference Manual and VT382-T User's Manual. 9.2.11 CSText Widget This section describes the CSText editing functions that are specific to Thai. For details about other features of the CSText widget, refer to Writing Software for the International Market. 9.2.12 Cursor Movement CSText supports cursor movement by display cell. When the cursor-left or cursor-right key is pressed, the cursor moves one cell to the left or right. Thus, it may move past 1, 2, or 3 character positions, depending on the number of nonspaced characters at the cursor position. When the cursor position is changed by a call to either DXmCSTextSetInsertionPosition or DXmCSTextSetCursorPosition, the cursor position is specified in number of characters from the beginning of the widget. The widget may adjust this position to ensure that the new cursor position is located on a display cell boundary. Users should not assume that the cursor 9–8 Tru64 UNIX Technical Reference for Using Thai Features is set to exactly the position specified. The DXmCSTextGetInsertionPosition function can be called after the cursor is set to get the actual cursor position. 9.2.13 Delete Character Operation When the delete key is pressed, the previous character is deleted. If a display cell contains three Thai characters, you must press the [Delete] key three times to delete the whole cell. Tru64 UNIX Technical Reference for Using Thai Features 9–9
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
advertisement