From 8e1291a4e6c976895f6eab5aac6ecf863841c245 Mon Sep 17 00:00:00 2001 From: ehouse Date: Tue, 4 Jul 2006 00:16:08 +0000 Subject: [PATCH] round up when determining top coord of letter in cell. Fixes "Q" getting drawn higher than other ascii chars, and does not break even taller chars in Danish or Portuguese. --- palm/palmdraw.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/palm/palmdraw.c b/palm/palmdraw.c index bf2c7de87..cc3842d5c 100644 --- a/palm/palmdraw.c +++ b/palm/palmdraw.c @@ -420,7 +420,10 @@ palm_common_draw_drawCell( DrawCtx* p_dctx, const XP_Rect* rect, XP_U16 x, y; x = localR.left + ((localR.width-strWidth) / 2); y = localR.top - dctx->fontHtInfo[tile].topOffset; - y += (localR.height - dctx->fontHtInfo[tile].height) / 2; + /* '+ 1' below causes us to round up. Without this "Q" is drawn + with its top higher than other ASCII letters because it's + taller; looks bad. */ + y += (localR.height + 1 - dctx->fontHtInfo[tile].height) / 2; if ( len == 1 ) { ++x; }