Commit 6e5f6d0c authored by Uwe Bonnes's avatar Uwe Bonnes Committed by Alexandre Julliard

XFONT_GetAvgCharWidth: Always round up.

parent 16d7d94f
......@@ -1099,12 +1099,13 @@ static INT XFONT_GetAvgCharWidth( LPIFONTINFO16 pFI, const XFontStruct* x_fs,
chars++;
}
}
if (chars) avg = (width + (chars>>1))/ chars;
if (chars) avg = (width + (chars-1))/ chars; /* always round up*/
else avg = 0; /* No characters exist at all */
}
else /* uniform width */
avg = x_fs->min_bounds.width;
TRACE(" retuning %d\n",avg);
return avg;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment