From a3588b2945817a693c8248a40e4a42952e4776a3 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 15 Dec 2000 00:03:43 +0000 Subject: [PATCH] oops - fix soem ascent & descent problems SVN revision: 3994 --- src/api.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/api.c b/src/api.c index 0ed9ee5..32ef381 100644 --- a/src/api.c +++ b/src/api.c @@ -2669,12 +2669,12 @@ imlib_get_maximum_font_ascent(void) switch (((ImlibFont *)ctxt_font)->type) { 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: - return ((ImlibFont *)ctxt_font)->xf.max_ascent * 64; + return ((ImlibFont *)ctxt_font)->xf.max_ascent; case IMLIB_FONT_TYPE_TTF_X: - return MAX(((ImlibFont *)ctxt_font)->xf.max_ascent * 64, - ((ImlibFont *)ctxt_font)->xf.ttffont->ttf.max_ascent); + return MAX(((ImlibFont *)ctxt_font)->xf.max_ascent, + ((ImlibFont *)ctxt_font)->xf.ttffont->ttf.max_ascent / 64); default: return 0; } @@ -2688,12 +2688,12 @@ imlib_get_maximum_font_descent(void) switch (((ImlibFont *)ctxt_font)->type) { 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: - return -((ImlibFont *)ctxt_font)->xf.max_descent * 64; + return -((ImlibFont *)ctxt_font)->xf.max_descent; case IMLIB_FONT_TYPE_TTF_X: - return MIN(-((ImlibFont *)ctxt_font)->xf.max_descent * 64, - ((ImlibFont *)ctxt_font)->xf.ttffont->ttf.max_descent); + return MIN(-((ImlibFont *)ctxt_font)->xf.max_descent, + ((ImlibFont *)ctxt_font)->xf.ttffont->ttf.max_descent / 64); default: return 0; }