After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 156781 - Add Lao Support to Thai Module
Add Lao Support to Thai Module
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
1.5.x
Other Linux
: Normal enhancement
: 1.8.0
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2004-10-29 06:28 UTC by Theppitak Karoonboonyanan
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Proposed patch (26.90 KB, patch)
2004-10-29 06:31 UTC, Theppitak Karoonboonyanan
none Details | Review
Sample Lao text, with two intentional errors. (1.37 KB, text/plain)
2004-10-29 06:36 UTC, Theppitak Karoonboonyanan
  Details
Sample text screenshot as rendered in GtkTextView and GtkEntry. (41.67 KB, image/png)
2004-10-29 06:42 UTC, Theppitak Karoonboonyanan
  Details
Updated patch, with comments and cleanups (27.38 KB, patch)
2004-10-30 03:51 UTC, Theppitak Karoonboonyanan
none Details | Review
Updated patch, with character properties factorized for use with GtkIM module. (34.00 KB, patch)
2004-11-02 12:31 UTC, Theppitak Karoonboonyanan
none Details | Review

Description Theppitak Karoonboonyanan 2004-10-29 06:28:34 UTC
Lao script is so close to Thai that it can be carried out with similar logic.
So, I think it's reasonable to extend existing Thai module to cover Lao as well.

My proposed plan is to replace the internal 8-bit TIS-620 code with Lao and Thai
codepages. Then, the WTT compose/input checking table can be enhanced to cover
some rare cases existing in old-style Lao script. And some other details can be
generalized from Thai terms.
Comment 1 Theppitak Karoonboonyanan 2004-10-29 06:31:49 UTC
Created attachment 33188 [details] [review]
Proposed patch

I have prepared a first patch based on a discussion with Anousak Souphavanh, a
native speaker from Laonux project.
Comment 2 Theppitak Karoonboonyanan 2004-10-29 06:36:50 UTC
Created attachment 33189 [details]
Sample Lao text, with two intentional errors.
Comment 3 Theppitak Karoonboonyanan 2004-10-29 06:42:44 UTC
Created attachment 33190 [details]
Sample text screenshot as rendered in GtkTextView and GtkEntry.
Comment 4 Theppitak Karoonboonyanan 2004-10-29 06:45:48 UTC
Since Anousak is not registered yet and I thus can't Cc: him, his contact
address is anousak@muanglao.com.
Comment 5 Theppitak Karoonboonyanan 2004-10-29 13:41:38 UTC
Added Anousak to Cc: list, as he's now registered.
Comment 6 Theppitak Karoonboonyanan 2004-10-30 03:51:35 UTC
Created attachment 33233 [details] [review]
Updated patch, with comments and cleanups
Comment 7 Theppitak Karoonboonyanan 2004-11-02 12:31:21 UTC
Created attachment 33343 [details] [review]
Updated patch, with character properties factorized for use with GtkIM module.

I propose to also separate the character properties tables from other parts, as
they can be shared with GtkIM module. (In the patch, it's moved into
thai-charprop.[ch]) I'll update the patch for Bug #81031 to use the same tables
in supporting Thai/Lao input as well.
Comment 8 Theppitak Karoonboonyanan 2004-11-21 11:34:52 UTC
Set target milestone to 1.8.0, as the proposed patch is tested.
Comment 9 Anousak Souphavanh 2004-11-24 03:49:09 UTC
This is to reply to the sample Lao text. The position of vowels, example SARA 
U, UU, E and EE, were NOT centered. This is perhaps NOT the font rendering 
engine and it is something that font makers had to use the Open Type Specs 
accordingly.  
Comment 10 Theppitak Karoonboonyanan 2004-11-28 15:32:46 UTC
The mark positioning can be adjusted by changing the GPOS data in the font. So,
I think it should be OK to commit the patch.

Patch committed to HEAD. Bug resolved as FIXED. Let's reopen if any issue is found.

2004-11-28  Theppitak Karoonboonyanan  <thep@linux.thai.net>

        Add Lao support to Thai module. (#156781)

        * modules/thai/Makefile.am modules/thai/thai-shaper.[ch]
        +modules/thai/thai-charprop.[ch]: Split WTT tables into a separate
        source. Extend the tables for Lao. 3 new classes are added (AM for
        SaraAm, AD4 for Nikkhahit, BCON for Lao semivowels). Now the range
        0x00-0x7f in TIS is used to store Lao characters. Rewrite ucs2tis()
        et al macros accordingly.

        * modules/thai/thai-shaper.c (get_next_cluster): Rewrite the
        clusterization code, so it's not specific to Thai-English texts. (Note
        that the special case of SaraAm is now handled by the new WTT character
        class. So, the extra checks are now eliminated.)

        * modules/thai/thai-shaper.c (get_glyphs_list, add_cluster):
        Add glyph calculation for Lao clusters.

        * modules/thai/thai-shaper.c (ThaiShapeTable structs,
        get_adjusted_glyphs_list): Generalize the shaping maps according to
        the new 8-bit internal encoding scheme. Now the character ranges are
        relocatable rather than hard-coded.  Add Lao shaping table.

        * modules/thai/thai-shaper.c (get_adjusted_glyphs_list): Add special
        case for Lao, where clusters can be longer than those of Thai.

        * modules/thai/thai-fc.c (get_glyph_index_tis): Add Lao glyphs lookup.

        * modules/thai/thai-ot.c (thai_ot_shape, +lao_ot_get_ruleset): Add Lao
        OT rulesets retrieval.

        * modules/thai/thai-fc.c (PangoEngineScriptInfo thai_scripts[]):
        Add Lao script entry.