some fixes to get the output nextx and nexty right... :)

SVN revision: 442
This commit is contained in:
Carsten Haitzler 1999-09-28 23:08:40 +00:00
parent d791522024
commit 177ac5eff9
2 changed files with 4 additions and 4 deletions

6
font.c
View File

@ -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
View File

@ -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;