Re: A little polish of Thai shaper



May I Cc: to Mark Leisher so that he could answer some question.

On Thu, Jun 14, 2001 at 09:40:43AM -0400, Owen Taylor wrote:
> 
> 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 think this should be answered by Mark Leisher himself whether he
would accept my last patch to ClealyU.

To my understanding: In the Unicode book, most combining characters
referred to are put after base character. So, I think it would be
natural for choice 1), as the normal advancing method will simply yield
the desired result.

The ClealyU font that comes with XFree86 also causes Mozilla to render
Thai web pages funny. And that made me suspected something wrong in
Mozilla rendering process for a while, until I had a chance to try
other fonts.

> 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.

Could you name some other examples of iso10646 fonts created by
non-Thai speakers that provide Thai glyphs, so that I can try them
out? (In fact, if they're not too many, I think I would just chase
them all for the change :-b)

> 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).

Yes, that's a good idea, if the two practices of fonts cannot be
united.

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




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