Re: Industry Thai Cell-Clustering Rules



K.Theppitak,

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

Here is what I found for the reason.

The idea of doing this is that the routine, pango_glyph_string_index_to_x(),
the first character index within the cluster will always be mapped to the
x coordiate at 0. The last character index within the cluster will always be
mapped to the whole width of the cluster. Please look at the source of
pango_glyph_string_index_to_x(), it will be helpful.

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

The comment is same as above.

Chookij V.

] 
] -Theppitak.
] 





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