oops - fix soem ascent & descent problems

SVN revision: 3994
This commit is contained in:
Carsten Haitzler 2000-12-15 00:03:43 +00:00
parent 571d51a852
commit a3588b2945
1 changed files with 8 additions and 8 deletions

View File

@ -2669,12 +2669,12 @@ imlib_get_maximum_font_ascent(void)
switch (((ImlibFont *)ctxt_font)->type) switch (((ImlibFont *)ctxt_font)->type)
{ {
case IMLIB_FONT_TYPE_TTF: case IMLIB_FONT_TYPE_TTF:
return ((ImlibFont *)ctxt_font)->ttf.max_ascent; return ((ImlibFont *)ctxt_font)->ttf.max_ascent / 64;
case IMLIB_FONT_TYPE_X: case IMLIB_FONT_TYPE_X:
return ((ImlibFont *)ctxt_font)->xf.max_ascent * 64; return ((ImlibFont *)ctxt_font)->xf.max_ascent;
case IMLIB_FONT_TYPE_TTF_X: case IMLIB_FONT_TYPE_TTF_X:
return MAX(((ImlibFont *)ctxt_font)->xf.max_ascent * 64, return MAX(((ImlibFont *)ctxt_font)->xf.max_ascent,
((ImlibFont *)ctxt_font)->xf.ttffont->ttf.max_ascent); ((ImlibFont *)ctxt_font)->xf.ttffont->ttf.max_ascent / 64);
default: default:
return 0; return 0;
} }
@ -2688,12 +2688,12 @@ imlib_get_maximum_font_descent(void)
switch (((ImlibFont *)ctxt_font)->type) switch (((ImlibFont *)ctxt_font)->type)
{ {
case IMLIB_FONT_TYPE_TTF: case IMLIB_FONT_TYPE_TTF:
return ((ImlibFont *)ctxt_font)->ttf.max_descent; return ((ImlibFont *)ctxt_font)->ttf.max_descent / 64;
case IMLIB_FONT_TYPE_X: case IMLIB_FONT_TYPE_X:
return -((ImlibFont *)ctxt_font)->xf.max_descent * 64; return -((ImlibFont *)ctxt_font)->xf.max_descent;
case IMLIB_FONT_TYPE_TTF_X: case IMLIB_FONT_TYPE_TTF_X:
return MIN(-((ImlibFont *)ctxt_font)->xf.max_descent * 64, return MIN(-((ImlibFont *)ctxt_font)->xf.max_descent,
((ImlibFont *)ctxt_font)->xf.ttffont->ttf.max_descent); ((ImlibFont *)ctxt_font)->xf.ttffont->ttf.max_descent / 64);
default: default:
return 0; return 0;
} }