summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/os/windows/font_win32.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os/windows/font_win32.cpp b/src/os/windows/font_win32.cpp
index 59d5e0ad8..55d4193e8 100644
--- a/src/os/windows/font_win32.cpp
+++ b/src/os/windows/font_win32.cpp
@@ -498,7 +498,7 @@ void Win32FontCache::ClearFontCache()
* For anti-aliased rendering, GDI uses the strange value range of 0 to 64,
* inclusively. To map this to 0 to 255, we shift left by two and then
* subtract one. */
- uint pitch = Align(aa ? gm.gmBlackBoxX : std::max(gm.gmBlackBoxX / 8u, 1u), 4);
+ uint pitch = Align(aa ? gm.gmBlackBoxX : std::max((gm.gmBlackBoxX + 7u) / 8u, 1u), 4);
/* Draw shadow for medium size. */
if (this->fs == FS_NORMAL && !aa) {