Mercurial > MadButterfly
comparison src/shape_stext.c @ 760:5781b2485e38
Fix position issue of stext.
Sometime, stext does not show at correct position. After some study,
it is caused by a typo in the code of create scaled font
(make_scaled_font_face()). The typo causes a fault in compute
transform matrix for scale fonts.
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Sat, 28 Aug 2010 22:54:07 +0800 |
parents | 744c64eb3182 |
children | 586e50f82c1f |
comparison
equal
deleted
inserted
replaced
759:ae1ae29348d1 | 760:5781b2485e38 |
---|---|
355 matrix[0] = font_sz; | 355 matrix[0] = font_sz; |
356 matrix[1] = 0; | 356 matrix[1] = 0; |
357 matrix[2] = shift_x; | 357 matrix[2] = shift_x; |
358 matrix[3] = 0; | 358 matrix[3] = 0; |
359 matrix[4] = font_sz; | 359 matrix[4] = font_sz; |
360 matrix[5] += shift_y; | 360 matrix[5] = shift_y; |
361 matrix_mul(noshift_aggr, matrix, scaled_matrix); | 361 matrix_mul(noshift_aggr, matrix, scaled_matrix); |
362 | 362 |
363 scaled = make_scaled_font_face_matrix(face, scaled_matrix); | 363 scaled = make_scaled_font_face_matrix(face, scaled_matrix); |
364 | 364 |
365 return scaled; | 365 return scaled; |