Re: A little polish of Thai shaper
- From: Chookij Vanatham <chookij thestork eng Sun COM>
- To: Chookij Vanatham Eng Sun COM, thep links nectec or th
- Cc: otaylor redhat com, chookij vanatham Eng Sun COM, gtk-i18n-list gnome org
- Subject: Re: A little polish of Thai shaper
- Date: Wed, 18 Jul 2001 09:29:10 -0700 (PDT)
Hi K.Theppitak,
I'm going to commit the patch to CVS now.
Sorry for the delay...
Chookij V.
] Date: Wed, 18 Jul 2001 16:35:08 +0700
] From: Theppitak Karoonboonyanan <thep links nectec or th>
] Subject: Re: A little polish of Thai shaper
] To: Chookij Vanatham <Chookij Vanatham Eng Sun COM>
] Cc: otaylor redhat com, chookij vanatham eng sun com, gtk-i18n-list gnome org
] MIME-version: 1.0
] Content-disposition: inline
] X-BeenThere: gtk-i18n-list gnome org
] Delivered-to: gtk-i18n-list gnome org
] User-Agent: Mutt/1.2.5i
] X-Mailman-Version: 2.0.5
] List-Post: <mailto:gtk-i18n-list gnome org>
] List-Subscribe: <http://mail.gnome.org/mailman/listinfo/gtk-i18n-list>,
<mailto:gtk-i18n-list-request gnome org?subject=subscribe>
] List-Unsubscribe: <http://mail.gnome.org/mailman/listinfo/gtk-i18n-list>,
<mailto:gtk-i18n-list-request gnome org?subject=unsubscribe>
] List-Archive: <http://mail.gnome.org/archives/gtk-i18n-list/>
] List-Help: <mailto:gtk-i18n-list-request gnome org?subject=help>
] List-Id: Internationalization and GTK+ <gtk-i18n-list.gnome.org>
]
] On Mon, Jun 18, 2001 at 04:55:07PM -0700, Chookij Vanatham wrote:
]
] > So, I think, seems to be we all agree to have ClearlyU font fixed for Thai.
] > Then, we need to change Thai Pango Shaper to handle iso10646 for Thai
] > non-spacing vowels/tonemarks as similar as others (Thai MS/MAC).
]
] Since I don't have writing permission to the CVS, I can just _wait_
] for this to happen.. :-b
]
] I've just checked out pango today and found no change in the module.
] So, may I explain my previous patch..
]
] (You may remove the lines with ### at the beginning to get the actual
] patch.)
]
] --- thai-x.c Fri Jun 15 03:38:23 2001
] +++ thai-x.c.new Wed Jul 18 15:40:55 2001
] @@ -309,7 +309,7 @@
] */
] static const ThaiShapeTable Mac_shape_table = {
] { 0xE7, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0xED, 0xEE },
] - { 0xE7, 0x83, 0x84, 0x85, 0x86, 0x87, 0x8F, 0xEE },
] + { 0x93, 0x83, 0x84, 0x85, 0x86, 0x87, 0x8F, 0xEE },
] { 0x93, 0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x8F, 0xEE },
] { 0x92, 0x00, 0x00, 0x94, 0x95, 0x96, 0x97 },
] { 0xD8, 0xD9, 0xDA },
] @@ -320,7 +320,7 @@
] */
] static const ThaiShapeTable Win_shape_table = {
] { 0xE7, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0xED, 0xEE },
] - { 0xE7, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x99, 0xEE },
] + { 0x9A, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x99, 0xEE },
] { 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F, 0x99, 0xEE },
] { 0x98, 0x00, 0x00, 0x81, 0x82, 0x83, 0x84 },
] { 0xFC, 0xFD, 0xFE },
] ###
] ### These ones are for fixing the codes for MAI TAIKHU shifted left.
] ###
] @@ -423,30 +423,21 @@
]
] if (combining)
] {
] - if (font_info->type == THAI_FONT_TIS ||
] - font_info->type == THAI_FONT_TIS_MAC ||
] - font_info->type == THAI_FONT_TIS_WIN)
] - {
] - glyphs->glyphs[index].geometry.width =
] - logical_rect.width + glyphs->glyphs[index - 1].geometry.width;
] - if (logical_rect.width > 0)
] - glyphs->glyphs[index].geometry.x_offset = glyphs->glyphs[index -
1].geometry.width;
] - else
] - glyphs->glyphs[index].geometry.x_offset =
glyphs->glyphs[index].geometry.width;
] ###
] ### Assuming that logical_rect.width can never be negative (i.e. >= 0),
] ### the previous assignments are equivalent to:
] ###
] ### glyphs->glyphs[index].geometry.width =
] ### logical_rect.width + glyphs->glyphs[index - 1].geometry.width;
] ### glyphs->glyphs[index].geometry.x_offset =
] ### glyphs->glyphs[index - 1].geometry.width;
] ###
] ### So, the 'if' statement can be reduced.
] ###
] - glyphs->glyphs[index - 1].geometry.width = 0;
] - }
] - else
] - {
] - glyphs->glyphs[index].geometry.width =
] - MAX (logical_rect.width, glyphs->glyphs[index -
1].geometry.width);
] - glyphs->glyphs[index - 1].geometry.width = 0;
] - glyphs->glyphs[index].geometry.x_offset = 0;
] ###
] ### Assuming the ClearlyU font to be fixed, this 'else' block should
] ### behave in the same manner as that in the 'then' block.
] ###
] - }
] + glyphs->glyphs[index].geometry.x_offset =
] + glyphs->glyphs[index - 1].geometry.width;
] + glyphs->glyphs[index].geometry.width =
] + logical_rect.width + glyphs->glyphs[index - 1].geometry.width;
] + glyphs->glyphs[index - 1].geometry.width = 0;
] ###
] ### In summary, we get these three assignments.
] ###
] }
] else
] {
] - glyphs->glyphs[index].geometry.x_offset = 0;
] - glyphs->glyphs[index].geometry.width = logical_rect.width;
] + if (logical_rect.width > 0) {
] + glyphs->glyphs[index].geometry.x_offset = 0;
] + glyphs->glyphs[index].geometry.width = logical_rect.width;
] + } else {
] + glyphs->glyphs[index].geometry.x_offset = ink_rect.width + 1;
] + glyphs->glyphs[index].geometry.width = ink_rect.width + 2;
] + }
] ###
] ### This last one is quite irrelevant. It's for rendering ill-formed
] ### combining characters as individual cells, according to WTT 2.0.
] ### (The spaces of one-pixel width are added before and after the
] ### ink_rect to separate the glyphs' ink.)
] ###
] }
]
] glyphs->glyphs[index].geometry.y_offset = 0;
]
] Regards,
] -Thep.
] --
] Theppitak Karoonboonyanan
] Information Research and Development Division, NECTEC
] (Was: Software and Language Engineering Laboratory)
] http://www.links.nectec.or.th/~thep/ mailto:theppitak nectec or th
]
] _______________________________________________
] gtk-i18n-list mailing list
] gtk-i18n-list gnome org
] http://mail.gnome.org/mailman/listinfo/gtk-i18n-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]