forked from old/legacy-imlib2
some fixes to get the output nextx and nexty right... :)
SVN revision: 442
This commit is contained in:
parent
d791522024
commit
177ac5eff9
6
font.c
6
font.c
|
@ -457,7 +457,8 @@ __imlib_render_str(ImlibImage *im, ImlibFont *fn, int drx, int dry, char *text,
|
|||
{
|
||||
j = text[strlen(text) - 1];
|
||||
TT_Get_Glyph_Metrics(fn->glyphs[j], &metrics);
|
||||
*nextx = w - (x_offset / 64) + metrics.advance - metrics.bbox.xMax;
|
||||
*nextx = w - x_offset + (metrics.advance / 64) -
|
||||
(metrics.bbox.xMax / 64);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
|
@ -472,7 +473,8 @@ __imlib_render_str(ImlibImage *im, ImlibFont *fn, int drx, int dry, char *text,
|
|||
{
|
||||
j = text[strlen(text) - 1];
|
||||
TT_Get_Glyph_Metrics(fn->glyphs[j], &metrics);
|
||||
*nexty = w - (x_offset / 64) + metrics.advance - metrics.bbox.xMax;
|
||||
*nexty = w - x_offset + (metrics.advance / 64) -
|
||||
(metrics.bbox.xMax / 64);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
2
main.c
2
main.c
|
@ -293,8 +293,6 @@ int main (int argc, char **argv)
|
|||
__imlib_render_str(im, fn, x, ty, str,
|
||||
255, 255, 255, al,
|
||||
0, &retw, &reth, 0, &nx, &ny);
|
||||
up = imlib_update_append_rect(up, px + 5, 5 + ty + (py - y), retw, reth);
|
||||
up = imlib_update_append_rect(up, x + 5, 5 + ty, retw, reth);
|
||||
up = imlib_update_append_rect(up, px, ty + (py - y), retw, reth);
|
||||
up = imlib_update_append_rect(up, x, ty, retw, reth);
|
||||
ty += ny;
|
||||
|
|
Loading…
Reference in New Issue