aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorEugene Sandulenko2020-01-07 22:46:24 +0100
committerEugene Sandulenko2020-01-07 22:46:24 +0100
commitda8bfeca5ec68550c49863e8ed4390337a48c0c9 (patch)
tree28d343529f6b465390e51013ce624cb21b8632db /graphics
parent858f8791ec7f5f8b0443963fbaaec91191eb6d41 (diff)
downloadscummvm-rg350-da8bfeca5ec68550c49863e8ed4390337a48c0c9.tar.gz
scummvm-rg350-da8bfeca5ec68550c49863e8ed4390337a48c0c9.tar.bz2
scummvm-rg350-da8bfeca5ec68550c49863e8ed4390337a48c0c9.zip
GRAPHICS: FONTS: Improved visuals for generated bold fonts
Diffstat (limited to 'graphics')
-rw-r--r--graphics/fonts/macfont.cpp28
1 files changed, 4 insertions, 24 deletions
diff --git a/graphics/fonts/macfont.cpp b/graphics/fonts/macfont.cpp
index e8a52d10b2..a32fac710f 100644
--- a/graphics/fonts/macfont.cpp
+++ b/graphics/fonts/macfont.cpp
@@ -643,9 +643,6 @@ static void magnifyGray(Surface *src, int *dstGray, int width, int height, float
}
}
-static const bool bdir = true;
-static const bool pile = false;
-
static void makeBold(Surface *src, int *dstGray, MacGlyph *glyph, int height) {
glyph->width++;
@@ -658,28 +655,11 @@ static void makeBold(Surface *src, int *dstGray, MacGlyph *glyph, int height) {
bool center = *srcPtr == 1;
bool right = x > glyph->width - 1 ? false : *(srcPtr + 1) == 1;
- bool tmp, bold;
-
- bool res;
-
- if (bdir) {
- /* left shifted image */
- bold = left;
- } else {
- /* right shifted image */
- bold = right;
- }
- if (pile) {
- /* left edge */
- tmp = left;
- res = (!tmp && center) || bold;
- } else {
- /* right edge */
- tmp = right;
- res = (!tmp && bold) || center;
- }
+ bool edge, bold, res;
- res = center || left;
+ bold = center || left;
+ edge = !center && right;
+ res = (bold && !edge);
*dst = res ? 1 : 0;
}