# HG changeset patch # User Thinker K.F. Li # Date 1249181999 -28800 # Node ID 2437047b8bb81dd3ed379236a45f9d7c8cd9f33b # Parent cb1a65d53878d1eda80ab6771843cc88d516f895 Fix bug of propertional shifting of sh_stext_t. Original - sh_stext_t does not apply shifting of text himself to scaled font face, but - apply aggreagated matrix to font face. - shifting in parent parent coord_t would applied to scaled font. - amount of shifting is also multiplied by aggreagated matrix. - It means shiftings of parent coord_ts are applied two times. Now, - remove x, y shifting from aggreagated matrices before applying to scaled fonts. diff -r cb1a65d53878 -r 2437047b8bb8 src/shape_stext.c --- a/src/shape_stext.c Sat Aug 01 20:56:31 2009 +0800 +++ b/src/shape_stext.c Sun Aug 02 10:59:59 2009 +0800 @@ -454,16 +454,21 @@ co_aix font_sz) { co_aix matrix[6], scaled_matrix[6]; co_aix *aggr; + co_aix noshift_aggr[6]; mb_scaled_font_t *scaled; aggr = sh_get_aggr_matrix((shape_t *)txt_o); + memcpy(noshift_aggr, aggr, sizeof(co_aix) * 6); + noshift_aggr[2] = 0; + noshift_aggr[5] = 0; + matrix[0] = font_sz; matrix[1] = 0; matrix[2] = shift_x; matrix[3] = 0; matrix[4] = font_sz; matrix[5] += shift_y; - matrix_mul(aggr, matrix, scaled_matrix); + matrix_mul(noshift_aggr, matrix, scaled_matrix); scaled = make_scaled_font_face_matrix(face, scaled_matrix);