Subject: TTF - Font Standard.

From: "L.S.Ng" <[email-masked]>
Date: Tue, 16 Nov 1993 14:20:25 GMT

My first impression after reading the TTF_SPEC.HLP is that Chinese TTF
might well have the same specifications as the English TTF, with some
minor changes.  The minor difference could be the number of glyphs
(characters) held in a font, and the similarity should be that the
glyphs structure itself is universal. (I see no reason why should a
Chinese glyph has a different structure.) Anyway, this is my guess.
Correct me if I am wrong.

So in order to check if my guess is correct or wrong, one definite test
would be to use existing English TTF subroutines to access a Chinese TTF
font file.

Further, if my guess is correct, then we can make use of the Chinese TTF
from a application-program level, without going through the services
provided by Chinese Windows.  i.e.  We still need TTF subroutines such
as rasterizer (convert TTF data to bitmap), but such subroutines should
be available in standard MS-SDK or others (#1).  As far as the
rasterizer is concerned, it need not know about whether it is dealing
with Chinese TTF or English TTF - if the TTF glyph structure is
universal.

(#1 frankly I am not sure about this.  Could someone please verify or
quote an example?)

Here is a model of using Chinese TTF that describe from the event of
pressing a key until a character is displayed on a device:

user input --> Chinese Input Dictionary Lookup
         --> Chinese Character Code
         -----> Chinese code translated into absolute position in TTF file
*        -----> GetFontData from TTF file
         -----> SendFontData to 'rasterizer'
         -----> Bitmap returned by rasterizer
         -----> Send bitmap to device

>From the stage marked * onwards, existing TTF subroutines could be used.

The stages before *, i.e. Chinese Input Overhead, may well be simple or
complex, subject to programmer's own choice.

Consequence: We can write Chinese Applications for DOS or Windows using
Chinese TTF (scaleable), without the need for DOS Chinese Shell or
Chinese Windows.

Action: Give it a try. If it works, wonderful.

Any comments are welcome.

Sincerely
Liangsheng WU

supplement:

Model of Chinese character output

 ----> Chinese character code
   ---> Code translate into absolute position in font file
   ...interim....
   ---> GetBitmap
   ---> SendBitmap to device

The model applies to both TTF and bitmap font, in the case of Bitmap
font, (.....interim.....) is trivial.

In the case of TTF, it requires service from 'rasterizer'.

Model of Chinese character input

  user input (key-stroke) ---> Dictionary lookup --> Chinese Char Code