aboutsummaryrefslogtreecommitdiff
path: root/graphics/fonts/bdf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/fonts/bdf.cpp')
-rw-r--r--graphics/fonts/bdf.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/graphics/fonts/bdf.cpp b/graphics/fonts/bdf.cpp
index 4374c36ff4..d901d1bb8c 100644
--- a/graphics/fonts/bdf.cpp
+++ b/graphics/fonts/bdf.cpp
@@ -767,17 +767,17 @@ BdfFont *BdfFont::scaleFont(BdfFont *src, int newSize) {
byte b = 0;
for (int x = 0; x < box.width; x++) {
+ b <<= 1;
+
int sx = (int)((float)x / scale);
if (srcd[sx / 8] & (0x80 >> (sx % 8)))
b |= 1;
- if (!(x % 8) && x) {
+ if (x % 8 == 7) {
*dst++ = b;
b = 0;
}
-
- b <<= 1;
}
if (((box.width - 1) % 8)) {