aboutsummaryrefslogtreecommitdiff
path: root/graphics/fonts
diff options
context:
space:
mode:
authorEugene Sandulenko2020-01-07 18:53:46 +0100
committerEugene Sandulenko2020-01-07 21:57:12 +0100
commitf7970c30a4a2ace45dc98f2d4d0cd3be1114ba65 (patch)
tree5861016966ad50fd2041493be465fd833e530bb1 /graphics/fonts
parentbfd796fec2e723bb3a43e672fcddf2dfd5108ccf (diff)
downloadscummvm-rg350-f7970c30a4a2ace45dc98f2d4d0cd3be1114ba65.tar.gz
scummvm-rg350-f7970c30a4a2ace45dc98f2d4d0cd3be1114ba65.tar.bz2
scummvm-rg350-f7970c30a4a2ace45dc98f2d4d0cd3be1114ba65.zip
GRAPHICS: FONTS: Fix BDF font scaling
Diffstat (limited to 'graphics/fonts')
-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)) {