Subject: CWIN description

From: [email-masked]
Date: Wed, 11 Sep 1991 18:13:13 PDT

Here is a brief introduction of CWIN 3.0.

Terence Kwan

[ NOTE: This is not an offical release document of Chinese Window 3.0.
Microsoft Corporation does not bare any responsibility for this document.
Use as your own risk. ]

-=-

Microsoft Taiwan Corporation
10 Fl, 399 Min Sheng E. Road
Taipei, Taiwan, R.O.C.

Microsoft Corporation
Far East Products Development
One Microsoft Way
Redmond, WA 98052 USA

Introduction

This document outlines the features added to or changed in Windows 3.0 to
 support the Chinese Language.  This changes are described versus or in
 comparison to the English Edition of Windows 3.0.  Throughout this document
 Windows 3.0 Chinese Edition will be abbreviated using the initialism CWIN3.

This paper assumes that the reader is familiar with the concepts surrounding the
 representation of the Chinese language with two bytes called the double byte
 code system (DBCS) commonly used in personal computers in the Far East.
Far East Common Additions

The three versions of Microsoft Windows found in the Far East are developed on a
 common base source code.  This common source code is a combination of
 development efforts of Microsoft teams and subsidiaries located in Redmond,
 Washington, USA; Tokyo, Japan; Taipei, Taiwan, R.O.C.; and Seoul, South Korea.
 The common code includes features necessary to support Han character based
 languages such as Kanji and its associated phonetic alphabets Hiragana and
 Katakana (Japanese), HanZi (Chinese),  and Hanja and the associated phonetic
 alphabet Hangeul (Korean).

The following sections discuss each of the Far East Common additions or
 modifications made to Windows 3.0 to create the Far East Common source based
 and the Chinese Edition.

DBCS Enabled Core

The Core of CWIN3 is comprised of GDI.EXE, USER.EXE, and KERNEL.EXE.  These core
 modules have been modified to fully recognize and manipulate DBCS characters as
 full characters instead of two separate bytes.  These modifications include the
 full enabling of the Windows common controls such as, but not limited to, edit
 controls, multiline edit controls, combo boxes, list boxes, and text controls.

These changes can be demonstrated to the user through the fact that the
 backspace, delete, and arrow keys move one full Chinese character, instead of a
 single byte or half of a Chinese character.  The user will also notice that
 mouse selections will break on character boundaries and that they cannot place
 the cursor in the middle of a Chinese character.   However, the changes to
 Windows to support DBCS go much deeper into CWIN that what is visually
 apparent.  These changes include sorting sequences, string concatenation and
 separation, internal storage and representation all of which increase the
 integrity of CWIN3 at the core when computing with, manipulating, or moving
 DBCS characters or strings internally.

DBCS Enabled Applets

All applications in CWIN3, called applets due to their small size and scope of
 operation, have been localized to work with double byte characters and double
 byte character strings.  Some applets have also been enhanced to provide Far
 East specific features such as vertical writing.

DBCS Enabled Utilities

All utilities in CWIN3 have been localized to work with double byte characters
 and double byte character strings.

Installable Font Technologies

CWIN3 has been extended with the Windows Intelligent Font Environment (WIFE)
 module which is part of the Far East Common Applications Program Interface
 (FECAPI).  WIFE allows CWIN3 to have multiple installable font drivers that
 support various types of Chinese font technologies.  These font technologies
 can include everything from the software based unhinted TrueType outline fonts
 (described later in this document) to hardware based cards using pattern ROMs.

CWIN3 allows for any or all of these Chinese font technologies to be installed
 and to provide Chinese or double byte fonts to the user for use on the screen
 and on the printer.  WIFE is integrated with the GDI core module to work in
 concert with GDI.  Thus, the user has access to the original, unmodified
 English GDI font files available from many third party sources and those
 English GDI fonts included in the CWIN3 package.

The FECAPI specification for writing a font driver and source code for a sample
 bitmap font driver is included in the CWIN3 Device Development Kit Extension
 (DDKE).

Installable Input Methods (IMEs)

CWIN3 provides for an open architecture for Chinese input methods.  The input
 method manager allows for multiple input methods to be installed and for
 changing the active input method through easy key strokes.  Only one input
 method can be active at a time.  The Input Method Manager is integrated into
 the Windows International Language Support (WINNLS) module.

The Chinese IMM/IME specification for writing a CWIN3 based input method and
 source code for a sample internal code IME is included in the CWIN3 Device
 Development Kit Extension (DDKE).

Printer Support

Background

Two types of printers are currently available in the market and are supported by
 CWIN3.  These printer include 1) printers with only English fonts built in and
 currently supported by the English edition of Windows 3.0, and 2) printers with
 both English and Chinese fonts built in and not supported by the English
 edition of Windows 3.0.  Support of these two types of printers require new
 printer drivers in order to fully work with CWIN3 and support Chinese.

The first type of printers do not have Chinese fonts built in and cannot print
 Chinese characters left to their own accord.  The printer drivers, necessary to
 allow CWIN3 to communicate with the printer, for these printers can be
 implemented in one of three ways.  The first method for installation is to
 install the original printer driver and provide no support for printing Chinese
 characters.  The second method for installation is to install the printer
 driver with a helper driver that can provide for Chinese character support.
 And, the third method is to rewrite the printer driver to provide for direct
 Chinese character support.  Original printer drivers written for Windows 3.0
 English Edition are not aware of the modifications and additions such as WIFE
 added to the Far East editions of Windows and defined under the FECAPI
 specification.

The second type of printer, those with both Chinese and English fonts built in,
 does not have original support in the English edition of Windows 3.0 and
 therefore, it is necessary to write an all new printer driver for CWIN3.  This
 printer driver should be a direct printer driver with support for the built in
 Chinese fonts.

The following sections provide more information about the various types of
 printer driver implementation and printing support in CWIN3.

Support for Original Printer Drivers without Chinese character support

Original English edition Windows 3.0 printer drivers can be installed into CWIN3
 unchanged.  These drivers will not support the printing of Chinese characters.
 They will, however, operate as normal when printing English text using either
 built in English fonts or using the Windows GDI English fonts.  The option to
 exclude Chinese character support can be selected at installation time.  Some
 printer drivers, like the Hewlett Packard PaintJet printer driver, can only be
 installed in this way because it provides support for color printing.

Support for Compatible (Original) Printer Drivers

Original English edition Windows 3.0 printer drivers can be installed into CWIN3
 unchanged and can support the printing of Chinese character through the use of
 a helper printer driver.  These drivers are called "compatible" printer drivers
 because they were written in such as way that they will cooperate with the
 helper printer driver.  Some printer drivers, such as the Hewlett Packard
 PaintJet printer driver, will not cooperate with the helper printer driver
 because they provide extended support for color printing.

The helper printer drivers is more correctly called the Dispatch Printer Driver
 abbreviated as DPD.  The DPD will be installed if the user selects Chinese
 character support when installing original printer drivers written for Windows
 3.0 English edition.  The DPD is installed before or in front of the
 "compatible" printer driver and will intercept commands that request Chinese
 characters thus doing that work for the original printer driver.

Once the user has installed a printer driver with Chinese character support thus
 invoking the use of the DPD, they will not need to do anything else to get
 printed Chinese support.

New Direct Printer Drivers for Printers with Built in English Fonts only

Installing original printer drivers using the DPD to gain Chinese character
 support can decrease  the performance of these printers due the fact that the
 DPD was designed to support many types of printers including laser and dot
 matrix printers.  Printing performance may be increased by rewriting the
 original printer drivers to implement Chinese character support through WIFE
 that works more closely with the native printing technology methodology.  These
 printer drivers, when composing a page for printing,  access Chinese fonts
 directly from WIFE when Chinese characters are printed.

The CHPPCL printer driver was implemented in CWIN3 as a new direct printer
 driver to make printing to Hewlett Packard LaserJet II and LaserJet III
 printers faster than using the DPD with the original HPPCL printer driver.

The FECAPI specification for writing a CWIN3 based direct printer driver and
 source code for sample printer drivers is included in the CWIN3 Device
 Development Kit Extension (DDKE).

New Direct Printer Drivers for Printers with built in
Chinese and English Fonts

Printers with built in Chinese and English fonts are the most useful printers
 for Chinese computing and printing.  However, these printers are unfortunately
 not supported by printer drivers developed for Windows 3.0 English Edition.
 This is due to the fact that these printers have built in Chinese fonts.  Thus,
 it is necessary to develop printer drivers that can make the intelligent
 decision between accessing Chinese and English characters from Windows GDI
 English fonts, Windows WIFE Chinese fonts, or from the built in English and
 Chinese fonts in the printer's memory.

Printing using built in printer fonts is substantially faster than printing
 using Windows fonts, either GDI or WIFE, due to the fact that Windows fonts
 must be rasterized into bitmaps and transferred to the printer as a bitmap over
 the printer interface.  If the font is built into the printer, then all Windows
 has to do is  request the printer to print the character and the printer does
 the remaining work to select the character from its font memory and print it.

The selection of an internal font from printer memory is much faster than the
 computer rasterizing the character and transferring it to the printer over the
 printer interface due to 1) the amount of data that must be transferred to the
 printer from the computer during printer and 2) the amount of work the printer
 does versus the amount of work that the computer does to print.

Thus, all printers with built in Chinese and English or Chinese only fonts will
 have to have new direct printer drivers developed in order to provide support
 for those printers in CWIN3.

The FECAPI specification for writing a CWIN3 based direct printer driver and
 source code for sample printer drivers is included in the CWIN3 Device
 Development Kit Extension (DDKE).

FECAPI is an open specification included in the CWIN3 Device Development Kit
 Extension (DDKE) and opens the font, IME, printer, and video driver
 architecture for third parties.  Font drivers, printer drivers (excluding
 dialog box text), and video drivers developed for CWIN3, that strictly follow
 the FECAPI specification, will operate unchanged on Windows 3.0 Japanese
 Edition, and Windows 3.0 Hangeul Edition (Korean).
Chinese Specific Features

Several features have been added to Windows 3.0 to specifically support the
 Chinese Language.  These changes were necessary to support language specific or
 market specific requirements.

The following sections discuss each of the Chinese specific additions made to
 Windows 3.0 to create the Chinese Edition.

Localized Text, Menus, and Dialogs

Text, menus, and dialogs in CWN3's have been localized into Chinese using
 traditional Chinese characters.  This localization includes all applets,
 Windows utilities, and most messages presented to the user by the system.

There are specific error messages for parts of CWIN3 that interface to DOS and
 display messages in DOS character mode sessions that have not been localized
 into Chinese.  These error messages were not localized due to the fact that
 CWIN3 can run on English editions of DOS which do not support Chinese messages
 in character mode.

Internal Code

The internal Code for CWIN3 is the standard Big-5 code.  This does not include
 any commonly implemented extensions to Big-5 implemented by companies such as
 E-Ten, Acer, or Zero/One.  The standard Big-5 code was selected due to it
 prolific use in Taiwan and in Chinese computing throughout the world.

Outline Font with Hand Tuned and User Defined Bitmaps

CWIN3 is delivered with an outline font technology and a single typeface
 implemented under the Far East common installable font technologies feature.
 The outline font technology will read font formatted with the TrueType font
 file format excluding hint information.  This font technology allows third
 party font vendors to market TrueType formatted font files excluding hints,
 commonly called unhinted TrueType, distributed on diskettes.

The unhinted TrueType font technology, also called the outline font driver,
 allows the user the availability of fully scaleable fonts on both the screen
 and printer.  The font technology allows the user to install additional fonts
 distributed on diskettes with great ease and incorporate the use of these fonts
 in all documents, spreadsheets, and other types of files produced by Windows
 programs.

The outline font driver that access the unhinted TrueType files will also use
 hand tuned and pre-rasterized bitmap font files if they are available for a
 particular point size.  Due to the very small sizes of Chinese characters at 12
 points and below, it may be necessary for some typefaces to include hand tuned
 bitmaps for readability.  As well, if the user has large amounts of disk space
 available, then they may wish to pre-rasterize and store selected point sizes
 of selected typefaces to increase the speed of the font technology by
 eliminating the need to rasterize the outline.

The outline font driver will also work in conjunction with user defined
 characters defined and drawn by the Userfont utility.  The outline font driver
 will access the user defined bitmap font files if the user requests a character
 not in the standard Big-5 code space of 13,053 characters.  If a user defined
 bitmap exists for the character in the typeface requested, then font driver
 will access that bitmap and scale it as necessary to present with the other
 characters of the selected point size and typeface.

The specification for the unhinted TrueType font file format and formats of the
 hand tuned and user defined bitmaps is included in the CWIN3 Software
 Development Kit Extension (SDKE).

End User Definable Font Utility (Userfont Utility)

Although CWIN3 uses the Big-5 code which includes 13,053 Chinese characters, it
 is necessary to allow the user to draw and use character not found in that
 13,053 character set.  This utility, commonly called the userfont utility,
 allows for the graphic design of Chinese character using a utility much like a
 painting program.  The utility allows the user to design the character, defined
 its internal code, from a predefined internal code space of over 6,000
 characters, and defined the keystrokes used to select the character in various
 input methods.

Third Party Chinese System Support

CWIN3 has been modified for support of Third Party Chinese Systems such as the
 E-Ten Chinese System.  Specific changes have been made to the video sections of
 CWIN3 to allow the Chinese Systems to operate, with some limitations outlined
 in the CWIN3 User's Guide, in DOS full screen sessions.

The specific modifications to CWIN3 include changes to the Windows Old
 Applications interface (WINOLDAP), the Virtual Display Drivers (VDD), and to
 the Video Grabbers (GB2 and GB3).  These changes recognize that Chinese Systems
 do not operate in common or standard video modes sometimes mixing both text and
 graphics modes of the video display.  Windows operates the video display
 hardware in fully graphic or fully text modes not mixing those modes.  CWIN3
 recognizes that Chinese Systems commonly uses all video memory regardless of
 video mode.  Chinese Systems often use graphics or text mode memory for saving
 data even though they report and are indicated to be in the opposite mode.  As
 well, Chinese Systems sometimes use video memory for storing critical data or
 they use all video memory in the system and it was necessary to modify CWIN3 to
 support this memory use.
Localized Chinese Help

Help in CWIN3 has been fully localized for the Chinese Edition.  CWIN3 Help has
 also been modified and extended for Chinese specific features.

IMEs

CWIN3 includes four simple input methods including the Phonetic and Chang Jei
 IMEs.  These input methods have been developed based on the Far East common
 installable input method architecture which has been extended to support
 multiple installed IMEs in the Chinese Edition.  These IMEs have been developed
 to support the most commonly known ways to input Chinese characters into a
 computer.

Due to the open architecture of CWIN3, additional input methods can be developed
 by third parties for installation by users into CWIN3.  Microsoft acknowledges
 that there are a vast numbers of different input methods and variations on the
 common input methods.  Third parties are encouraged to develop and market their
 Windows based IMEs using the published IMM/IME specification.  Third parties
 are encouraged to market these new IMEs on the open market.

Chang Jei

The CWIN3 Chang Jei input method is based on public domain Change Jei input
 method and adheres to the Change Jei tables published by E-Ten Information
 Systems, Inc.

Phonetic

The Phonetic input method is based on the Phonetic alphabet commonly taught in
 Taiwan and adheres to the Phonetic tables published by E-Ten Information
 Systems, Inc.

Quick/Simplified

The Quick or Simplified input method is a variation on the Chang Jei input
 method.

Internal Code
The Internal code input method selects characters based on the Big-5 internal
 code.

Vertical Writing in Paintbrush

Vertical writing capabilities were added to Paintbrush to support Chinese
 vertical writing when using the Text Tool.

English (unlocalized) Windows 3.0 Application Support

CWIN3 was developed to provide the highest level of support possible for English
 or unlocalized Windows 3.0 Applications found on the market without
 jeopardizing the functionality of fully localized Chinese Windows applications.
  English Applications support was added to CWIN3 to provide the largest number
 of applications for the Chinese market as is possible.

This support was primarily implemented by providing for font association.  Font
 association is where the user is allowed to select an English font, such as
 Helvetica, and type in Chinese characters not found in that English font.  When
 a user selects an English font, the Chinese system font is also automatically
 selected and available if the user types in Chinese characters using one of the
 input methods.

In addition to font association, the user is permitted to use original English
 and original Chinese fonts mixed on the same line.  This mixed font scheme is
 achieved by selecting the font, by name, from the application's font menu.
 There are some considerations, however, when mixing Chinese and English fonts
 on the same line and these considerations surround the baseline of the fonts
 used.  The baseline is an imaginary horizontal line on which the character
 rests.  As well, the baseline is commonly the place where an underline is
 drawn.  Chinese fonts include both Chinese and English characters, however, the
 baseline of the English characters is a the bottom of the destenders of the
 English characters when they are included in the Chinese font.  Destenders are
 the parts of English characters that go below the underline like the Y or G in
 the following example using the Tms Rmn English font 14pts:

	yyyyyygggggg

The base line in the English included in the Chinese font is closer to the
 bottom of the destenders as in this example using the ShouSung Chinese font
 14pts:

	yyyyyygggggg

Therefore, if one mixes Chinese, English from the Chinese font, and original
 English fonts on the same line, the two English samples will have differing
 baselines as in the 14pt sample below using Tms Rmn as the English font and
 ShouSung as the Chinese font:

	English Font	|	English in Chinese Font	|	Chinese Font
yyyyyyggggggyyyyyyyggggggggyyyyyyy&c&c&c

This was designed into Chinese Windows to provide the best of both English
 Windows and Chinese computing to the user.  If a user is creating a primarily
 Chinese document, with some English words, the English lines up as what would
 seem to be appropriate.  If the user is writing a primarily English document,
 then he or she can select the original English fonts and the output will look
 very natural.

Mark, Copy, & Paste support with Code Conversion

CWIN3 includes a utility that will operate in full screen DOS sessions to
 provide mark, copy, and paste functionality like that found in windowed DOS
 sessions.  The utility, called PRNTSCRN.EXE,  is run as a DOS (non-Windows)
 utility that can be invoked as a TSR (Terminate and Stay Resident routine) or
 for a single session's use to allow the user to use the mouse or keyboard to
 highlight a section of the screen and to copy the text from the highlighted
 section to the Windows 3.0 clipboard.

The utility also provides for code conversion from IBM Standard 5550 code, E-Ten
 code, TCA code, or CNS code to Big-5 code.  The code used for conversion can be
 selected at invocation.

Mark, Copy, & Paste with Code Conversion was added as a Chinese specific feature
 due to the fact that third party Chinese Systems cannot be reliably operated in
 a windowed DOS sessions and may use different internal codes than the Big-5
 code.  Third party Chinese systems cannot reliably operate in a windowed DOS
 session due the fact that they operate in various graphics or mixed text and
 graphics modes not currently supported by CWIN3.  It was conceived based on the
 fact that Chinese system users should have the same functionality available to
 them as those users who use DOS only in English mode and that this
 functionality should support multiple code systems.

Flat File Code Conversion Utility

CWIN3 includes a utility to convert flat files between and among the Big5, TCA,
 IBM Standard 5550, Eten, and CNS codes.  This code conversion utility was
 provided to support users from Chinese systems or DOS versions that were not
 based on the Big-5 code.  The utility is intended to make it easier for users
 to work in conjunction with or migrate from systems using other than the Big-5
 code.

Code Conversion DLL for Chinese Windows Applications

CWIN3 includes a new Dynamic Link Library (DLL) for Chinese Windows applications
 to do code conversion.  This DLL provides six new Applications Program
 Interfaces (APIs) to do conversion of codes. These APIs include conversion of
 three types of data structures, characters, strings, or buffers and can convert
 from TCA, IBM Standard 5550, Eten, or CNS codes to Big-5 code or vice versa.
 This will allow for the development of Chinese Windows applications, such as
 word processors,  that support many types of encoded files.

IBM PS/55 Support

Support for the IBM PS/55 is provided in CWIN3.  IBM Taiwan Corporation has
 developed drivers for CWIN3 to support the IBM PS/55 keyboard and the IBM PS/55
 5577/5575 printers.  These drivers have been included in CWIN3 by Microsoft and
 the IBM PS/55 can be selected as the computer when installing CWIN3.  Please
 note that IBM DOS Version 4.01T (commonly called TDOS) is only supported
 operating in English mode.

Additional Information

All specifications and kits indicated in this document are available in Final
 form from Microsoft Taiwan Corporation.

	Microsoft Taiwan Corporation
	10 Fl., 399 Min Sheng E. Rd.
	Taipei, Taiwan, R.O.C.,
	TEL: (02) 504-3122
	FAX: (02) 504-3121

Microsoft Corporation (NASDAQ "MSFT") develops, markets and supports a wide
 range of software for business and professional use, including operating
 systems, network products, languages and applications, as well as books,
 hardware and CD-ROM products for the microcomputer marketplace.

###

Microsoft and the Microsoft logo are registered trademarks and Windows is a
 trademark of Microsoft Corporation.