This appendix describes the display, manipulation, and printing of text using CDE and the Thai and Hebrew locales.
The Solaris 7 operating environment includes the Thai Language Environment (TLE). TLE provides a localized Thai language environment that enables you to type, display, and print the Thai language. In addition, TLE provides a platform for building Thai language applications, commands, and other features for the operation and maintenance of Solaris 7 and CDE 1.3.
The following list describes the features of TLE:
Code Set Standard
This release supports the Thai Industrial Standard (TIS 620-2533) for representing Thai characters. Directory and file names can consist of Thai characters.
Thai Text Input
This release includes an input mode indicator for each window to indicate the current input mode. You can also convert ASCII input to Thai characters using the dynamically loadable module for the internationalized X11R6 library. You can type text using a regular Sun Type 4 or Type 5 keyboard.
Thai Text Output
All Common Desktop Environment (CDE 1.3) text rendering routines have been enhanced for displaying Thai text. The output method algorithm is based on the WTT 2.0 Thai text display specification, which is maintained by the Thai government. This release also includes Thai bitmap and TrueType fonts.
Thai Text Printing
Printer support is provided for 15 dot matrix printers. For a list of printers supported, see Appendix C in Thai Language Supplement for Solaris 2.6: Release Overview.
Common Desktop Environment Productivity Tools
All CDE 1.3 application windows display and accept Thai text. You can also cut and paste text between window applications. This release supports Thai input at the Xlib level and Thai output at the toolkit level, including CDE 1.3. This release also provides localized CDE desktop tools that display Thai labels and messages, and supports the use of Thai text, file names, and so on.
Complex Text Layout (CTL)
CTL additions enable Motif APIs to support writing systems that require complex transformations between logical and physical text representations. It also provides character shaping and the transformation of static and dynamic text widgets. In addition, CTL supports right-to-left and left-to-right text orientation and tabbing for dynamic text widgets.
TLE contains the CDE 1.3 library, which includes Thai text manipulation (insertion, deletion, selection, cut, copy, paste, drag, and drop) according to WTT 2.0 standards. For information about using the library to develop programs, see Solaris Common Desktop Environment: Programmer's Guide.
This section explains the mechanics of manipulating Thai characters.
You may need to intersperse Thai and English text in the same file. To toggle a window between English and Thai or Thai and English, press Ctrl+spacebar. The message window at the base of each tool displays the current input language.
This section describes how to work with Thai text, specifically, how to:
Insert and delete text
Wrap text
Move the cursor
Select text
Copy/paste and drag-and-drop text
Inserting and deleting Thai characters changes the display of the text, depending on whether the character classes can be composed.
The following graphics show the sequence of inserting MAIHUNAKAT (AV2 vowel) between SARA_II (AV3 vowel) and YOYAK (consonant) .
MAIHUNAKAT cannot be composed with SARA_II, so it must be displayed in its own cell.
The following example shows the deletion of SARA_II (AV3 vowel).
MAIHUNAKAT can be composed with NONU (consonant class CONS). Therefore, it is displayed in the previous cell.
There are no delimiters (spaces) between words in Thai. This makes correct character wrapping difficult because of the combinations of spacing and non-spacing characters.
In Solaris 7 TLE character wrapping is done at the display cell, and the TLE software compensates for non-spacing characters when wrapping a line. For example, when a forward spacing character is typed in the last column of a line, the cursor advances to the next line. If a non-spacing character is typed at the same point, the cursor does not advance to the next line. The non-spacing character is displayed in the last display cell of the previous line, and the cursor location remains unchanged.
When a display cell is selected, all characters within the display cell (spacing and non-spacing) are selected.
The multiple display levels of the Thai language may seem to cause unusual cursor movement in dtpad (text editor) windows. The cursor physically moves only between display cells. However, because there is frequently more than one Thai character in a display cell, the cursor does not physically move between them.
Cursor movement in a Terminal window is slightly different from editing text in one of the Thai CDE tools using text widgets (such as dtpad). When you move the cursor in a Terminal window, if there is only one character in a display cell, the cursor will be highlighted in the cell. If the character shares a display cell, the entire display cell will be highlighted.
You can display a combination of Thai and English characters using the four Thai fonts included in this release. The fonts are listed in Table D–1 and Table D–2.
You can display a combination of Thai and English characters using the four Thai fonts included in this release. The fonts are listed in Table D–1.
Table D–1 Solaris 7 TLE Fonts (Scalable)
Type Face |
Style |
Font Name |
---|---|---|
Angsana |
Normal |
-monotype-angsa-medium-r-normal--*-*-*-*-m-*-tis620.2533-0 |
Bold |
-monotype-angsab-bold-r-normal--*-*-*-*-m-*-tis620.2533-0 |
|
Italic |
-monotype-angsai-medium-i-normal--*-*-*-*-m-*-tis620.2533-0 |
|
BoldItalic |
-monotype-angsaz-bold-i-normal--*-*-*-*-m-*-tis620.2533-0 |
|
Browalia |
Normal |
-monotype-browa-medium-r-normal--*-*-*-*-m-*-tis620.2533-0 |
Bold |
-monotype-browab-bold-r-normal--*-*-*-*-m-*-tis620.2533-0 |
|
Italic |
-monotype-browai-medium-i-normal--*-*-*-*-m-*-tis620.2533-0 |
|
BoldItalic |
-monotype-browaz-bold-i-normal--*-*-*-*-m-*-tis620.2533-0 |
|
Cordia |
Normal |
-monotype-cordia-medium-r-normal--*-*-*-*-m-*-tis620.2533-0 |
Bold |
-monotype-cordiab-bold-r-normal--*-*-*-*-m-*-tis620.2533-0 |
|
Italic |
-monotype-cordiai-medium-i-normal--*-*-*-*-m-*-tis620.2533-0 |
|
BoldItalic |
-monotype-cordiaz-bold-i-normal--*-*-*-*-m-*-tis620.2533-0 |
|
Table D–2 Solaris 7 TLE Fonts (Fixed Width)
Type Face |
Style |
Font Name |
---|---|---|
Gothic Normal |
12pt |
-logic-gothic-medium-r-normal--12-120-75-75-c-80-tis620.2533-0 |
14pt |
-logic-gothic-medium-r-normal--14-140-75-75-c-90-tis620.2533-0 |
|
16pt |
-logic-gothic-medium-r-normal--16-160-75-75-c-80-tis620.2533-0 |
|
20pt |
-logic-gothic-medium-r-normal--20-200-75-75-c-100-tis620.2533-0 |
|
24pt |
-logic-gothic-medium-r-normal--24-240-75-75-c-100-tis620.2533-0 |
|
Gothic Bold |
12pt |
-logic-gothic-bold-r-normal--12-120-75-75-c-100-tis620.2533-0 |
14pt |
-logic-gothic-bold-r-normal--14-140-75-75-c-110-tis620.2533-0 |
|
16pt |
-logic-gothic-bold-r-normal--16-160-75-75-c-80-tis620.2533-0 |
|
20pt |
-logic-gothic-bold-r-normal--20-200-75-75-c-120-tis620.2533-0 |
|
24pt |
-logic-gothic-bold-r-normal--24-240-75-75-c-120-tis620.2533-0 |
|
Gothic Italic |
16pt |
-logic-gothic-medium-i-normal--16-160-75-75-c-80-tis620.2533-0 |
This section describes how to print Thai text from CDE 1.3 and a dot matrix printer. For a list of dot matrix printers supported, see Appendix C of Thai Language Supplement for Solaris 2.6: Release Overview.
If the Angsana UPC font is installed on your printer, you can print from any CDE 1.3 tool (fonts are not provided in Solaris 7 TLE).
This section assumes that your printer is registered in the WTT 2.0 standard listed in Appendix C, "Printer Brand, Model, and Code IDs" of Thai Language Supplement for Solaris 2.6: Release Overview.
If the system you are setting up uses printers that are registered in the WTT 2.0 standard, set them up using the instructions in the Setting Up User Accounts, Printers, and Mail manual of the SunOS 5.6 documentation.
Once your printer is set up, follow these steps to enable printing of Thai characters:
Type cd /usr/lp/interfaces
Edit the file named for the printer you just set up.
Change lp.cat to lp.filter in the following line:
if [! -x "${LPCAT:=${LOCALPATH}/lp.cat}"]
Create a shell script in /usr/lib/lp/bin called lp.filter that pipes printer jobs through lp.cat.
The lp.filter program should have the syntax given below. See the thaifilter(1) man page in Appendix D, "Manual Pages", of the Thai Language Supplement for Solaris 2.6: Release Overview for the syntax of the thai_filter_command.
thai_filter_command | lp.cat
This section describes how to use the thaifilter(1) print utility and printer conversion tables, which you may need to print Thai text.
The thaifilter(1) program is a filter that converts Thai text into three levels:
Base level characters (including any ASCII characters)
Above-level characters
Below-level characters
This system is called 3-Level Classification. The two main uses for files converted to 3-Level Classification are:
To direct printers to print Thai characters at the correct display level.
To view Thai text files on terminals that normally do not allow the multi-level (normal) display of Thai text.
Some newer printers come with 3-Level Classification software already installed. For that reason the thaifilter(1) program has the -x option that turns 3-Level Classification off.
The thaifilter(1) man page is supplied in the TLE 2.6 software, and is also available in printed form in Appendix D, "Manual Pages", of the Thai Language Supplement for Solaris 2.6: Release Overview.
The WTT 2.0 standard identifies the following terms and conventions for printing Thai text:
Printer IDs
Printer IDs are 6-character codes defined by TAPIC to specify a printer's model, brand name, and character code. Printer vendors should have their printer codes clearly marked on their printers. The syntax for a printer ID is BBMMCC, where BB is a two-letter brand abbreviation, MM is a two-letter model abbreviation, and CC is a two-digit number representing the conversion code the printer uses. The printer brand and model abbreviations are listed in Appendix C, "Printer Brand, Model, and Code IDs," of the Thai Language Supplement for Solaris 2.6: Release Overview. See the next section for a discussion of printer conversion codes.
For example, the first line of Table D–3 shows that the brand and model abbreviations for a Data Products IZR650 printer are DA and ZI. If this printer used the code conversion table number 10, the full printer ID would be: DAZI10.
Conversion codes and printer code conversion tables
Use the codes listed in the right side of Table A-3 when specifying a printer ID. Solaris 7 TLE adheres to TIS 988-2533, which specifies a table of codes for printing to the TAC11x11.COD standard. Because not every printer uses this table, the TIS standard specifies a total of 17 code conversion lookup tables to convert other known printer codes to TAC11x11.COD. (TAC is an abbreviation for the Thai API Consortium. APIs defined by the Thai Internationalization Committee are prefixed with “TAC.”)
These 17 code conversion tables are supplied with Solaris 7 TLE for converting the codes supplied with various printers to the TAC11x11.COD standard. The tables, listed in Table D–3, are stored in the /usr/lib/lp/files directory.
Table D–3 Code Conversion Tables
Code Conversion Table |
Code for Use With Printer ID |
---|---|
TAC11x10.COD |
10 |
TAC11x12.COD |
12 |
TAC11x13.COD |
13 |
TAC11x14.COD |
14 |
TAC11x15.COD |
15 |
TAC11x16.COD |
16 |
TAC11x17.COD |
17 |
TAC11x18.COD |
18 |
TAC11x19.COD |
19 |
TAC11x20.COD |
20 |
TAC11x21.COD |
21 |
TAC11x22.COD |
22 |
TAC11x40.COD |
40 |
TAC11x41.COD |
41 |
TAC11x42.COD |
42 |
TAC11x43.COD |
43 |
TAC11xAA.COD |
AA |
If your printer does not use one of the printer code conversion tables, see the following section for help with creating your own.
Printer conversion tables are used to convert printing instructions to the TIS 988-2553 format, which is the WTT 2.0 default printing format. The code conversion tables listed in the WTT 2.0 standard are included with Solaris 7 TLE.
If the printer you are using does not use the TIS 988-2553 format, and cannot use any of the code conversion tables, then you need to create a custom conversion table. This section explains how to create a new printer code conversion table.
Conversion Table Syntax
The following is an example of a code conversion file:
-- -- -- -- TN -- ! TAC11x10.COD 16 AUG 1991 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA 3F 3F 3F 3F DF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB 3F 3F 3F FF ! End of TAC11x10.COD
The first line of a code conversion table uses the following syntax:
CC LG UM EX TN SP ! comment
If one of the two-character fields is not used, it must be replaced with two dashes (--). The fields in the first line are explained in Table D–4.
Table D–4 Code Conversion Tables
Field |
Description |
---|---|
CC |
Combined Code at TIS 988-2553, for example SaraI and MaiEk |
LG |
Line Graphic |
UM |
The combination code of SaraAm and Nikhahit |
EX |
Ascender Extension |
TN |
Thai Numerics |
SP |
Special code not defined in TIS 988-2553 |
! comments |
Any comments you have. In the WTT 2.0 standard this field contains the name of the file and the date. The comment must be proceeded by the "!" symbol. |
The middle of the conversion file contains 16 lines of 16 codes, a total of 256 codes. These codes are the replacement for the TIS 988-2553. The TIS988-2553 code is shown below:
-- -- -- -- TN -- ! TAC11x11.COD 16 AUG 1991 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF ! End of TAC11x10.COD Note: There is no conversion in this table
The last line of the conversion table is another comment, proceeded by the "!" symbol. The WTT 2.0 conversion tables end with the line:
! END OF filename
The Solaris 7 operating environment includes the Hebrew Language Environment. This section describes the main features of the Hebrew Language Environment.
You may need to intersperse Hebrew and English text in the same file. To toggle between Hebrew and English input modes, use Ctrl+t. The message at the base of each tool displays the current input language.
This section describes how to work with Hebrew text, specifically, how to manipulate the cursor within the logical edit mode.
You may find a residual cursor image at the beginning of a line of text, after text has been entered. Functionality is not affected by this residual image. Continue entering data.
There is ambiguity when the text insertion point is in the boundary between Hebrew and English text. To solve this ambiguity, a split cursor has been implemented to reflect the two positions. The display will be ab|DC| where “|” represents each cursor.
The split cursor may not display properly when pressing the Home or End keys.
Hebrew printing is implemented by using a set of filters. The Hebrew locale package SUNWheu should be installed on both the server machine to which the printer is attached and the client machine.
The following list of filters are included in the Hebrew locale package.
This heb2ps filter converts any text to postscript and sends the Hebrew font together with font to printer.
Input types: heb2ps
Output types: postscript
Printer types: any
Printers: any
Filter type: slow
Command: /usr/openwin/bin/mp
Options: INPUT * = -A4
Options: INPUT * = -L he
When printing with the hebl2r filter, no reordering is done on input text. Text is formatted to fit an 80 column paper size. This would be useful for printing an English document with a few Hebrew words.
Input types: hebl2r
Output types: heb2ps
Printer types: any
Printers: any
Filter type: slow
Command: /usr/lib/lp/postscript/convert_text
Options: INPUT * = -linewidth 80
When printing with the hebr21 filter, all text is indiscriminately reversed and the resulting printer output is aligned to the right.
Input types: hebr21
Output types: heb2ps
Printer types: any
Printers: any
Filter type: slow
Command: /usr/lib/lp/postscript/convert_text
INPUT * = -linewidth 80 -inputLayoutDirection right_down -outputLayoutDirection left_down
When printing with the hebtxt filter, text is sorted in both Hebrew and English directions and the resulting printer output is aligned to the right
Input types: hebtxt
Output types: heb2ps
Printer types: any
Printers: any
Filter type: slow
Command: /usr/lib/lp/postscript/convert_text
INPUT * = -inputTextMode text_mode_implicit -outputTextMode text_mode_visual -lineWidth 80 -inputLayoutDirection left_down -outputLayoutDirection right_down
To print from the command line, use the hebtxt filter. The lp printing command is lp -T hebtxt -d printer_name.
The print action field in the dt configuration files should be modified to add the Hebrew text filter. For example, in the dtmail application, the print action in the file /usr/dt/appconfig/types/he/dtmail.dt should be:
ACTION Print { LABEL Print ARG_TYPE DTMAIL_FILE TYPE COMMAND WINDOW_TYPE NO_STDIO EXEC_STRING sh -c ' \ dtmailpr -p -f %(File)Arg_1% | /usr/lib/lp/postscript/convert_text -inputTextMode -text_mode_implicit -outputTextMode text_mode_visual -lineWidth 80 -inputLayoutDirection left_down -outputLayoutDirection right_down| mp -A4 -L he| dtlp -u %(File)Arg_1%;'}
The listed convert_text parameters will print right-aligned text right-to-left. To print text aligned to left, left-to-right replace the previous parameters with -lineWidth 80.