Re: A little polish of Thai shaper



Theppitak Karoonboonyanan <thep links nectec or th> writes:

> I've just tested pango-0.16 with an iso10646 font, and the upper& lower
> vowels for Thai appear to be shifted to the left, as shown in :-
> 
>   http://linux.thai.net/~thep/2001_06_12_223941_shot.jpg
> 
> (Note that in the screenshot, I use an adjusted version of clearyu
> font to correct Thai glyphs. And I have already sent the patch to
> the author.)
> 
> I found that the case of iso10646 fonts are distinguished from other
> kinds of Thai fonts, which is not necessary here. I've tried fixing it,
> as in the attached patch, and the result is :-
> 
>   http://linux.thai.net/~thep/2001_06_12_235512_shot.jpg

I think the problem is that there is no standard for where vowels
are placed within the character cell, so you can have different
types of iso10646 fonts with different placements of vowels. :-(

 1) Vowel is to left of origin, and will align properly with previous
    character after advancing the previous characters advance.

 2) Vowel is to the right of the origin; it should be drawn at the
    same x location as the previous character.

I believe the current shaping rules used for iso10646-1 are 2) and
give the right results for Mark Leisher's ClearlyU fonts. These are,
on XFree86 at least, the fonts that non-Thai speakers are likely to
have with Thai glyphs. However, the fonts that Thai speakers are using
are probably more important...
 
I don't really have a good feeling for what we should be doing here -
probably it would be best to add a property to the BDF fonts to
indicate which rule is being used.

If we decide that only 1) is the correct way of doing things, it may
also be possible to get future revisions of XFree86 to use those
metrics. Neither of these does much good for existing fonts out
there.

Perhaps the best thing to do is to make the Thai shaper simply
retrieve the metrics for the vowel glyphs using
pango_font_get_glyph_extents(), and then decide based on those whether
to use 1) or 2).

Regards,
                                           Owen




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]