Re: Industry Thai Cell-Clustering Rules



On Thu, Nov 09, 2000 at 10:17:03AM -0800, Chookij Vanatham wrote:
> 
> ] ---- 8< ----
> ] @@ -451,7 +450,11 @@
> ]        glyphs->glyphs[index].geometry.width = 
> ]  	MAX (logical_rect.width, glyphs->glyphs[index - 1].geometry.width);
> ]        glyphs->glyphs[index - 1].geometry.width = 0;
> ] +#ifdef	WTT_CLUSTERING
> ] +      glyphs->glyphs[index].geometry.x_offset = 
> glyphs->glyphs[index].geometry.width;
> ] +#else
> ]        glyphs->glyphs[index].geometry.x_offset = 0;
> ] +#endif
> ] 
> ] How about just this for combining case?
> ] 
> ]        glyphs->glyphs[index].geometry.x_offset = 0;
> ]        glyphs->glyphs[index].geometry.width = 0;
> 
> The .x_offset is the position where the glyph is started to be drawn
> and those vowels/tonemarks glyphs are displayed on the Q2 (negative x).
> If .x_offset is zero, then, we will see all those tonemarks displayed
> ahead of consonances. That's why I change it to be drawn from the right edge
> of consonance. I think we need to have the special case for SaraAm as well.

I meaned, the old method tried to make the last combining character keep the
information of the cluster's width, which is quite messy.

Why not just letting the base consonant occupy the horizontal space and
let the combining vowel/tone mark occupy no space at all?

That is, these lines :

        glyphs->glyphs[index].geometry.width = 
  	  MAX (logical_rect.width, glyphs->glyphs[index - 1].geometry.width);
        glyphs->glyphs[index - 1].geometry.width = 0;

just become :

	glyphs->glyphs[index].geometry.width = 0;

leaving glyphs->glyphs[index-1].geometry.width intact.

And this line :

	glyphs->glyphs[index].geometry.x_offset =
	  glyphs->glyphs[index].geometry.width;

just becomes :

	glyphs->glyphs[index].geometry.x_offset = 0;

to let the tone/diacritic rendering be started at the right position of
the base consonant (because the consonant's width was left intact).

Then, the negative x of tone/diacritic just works its own way.

-Theppitak.





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