mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
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.
This commit is contained in:
parent
63a948cbd4
commit
58bb0734b8
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue