mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26: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
83d8d8b9e8
commit
8e1291a4e6
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