[Scummvm-git-logs] scummvm master -> da8bfeca5ec68550c49863e8ed4390337a48c0c9
sev-
sev at scummvm.org
Tue Jan 7 21:47:00 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
da8bfeca5e GRAPHICS: FONTS: Improved visuals for generated bold fonts
Commit: da8bfeca5ec68550c49863e8ed4390337a48c0c9
https://github.com/scummvm/scummvm/commit/da8bfeca5ec68550c49863e8ed4390337a48c0c9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-01-07T22:46:24+01:00
Commit Message:
GRAPHICS: FONTS: Improved visuals for generated bold fonts
Changed paths:
graphics/fonts/macfont.cpp
diff --git a/graphics/fonts/macfont.cpp b/graphics/fonts/macfont.cpp
index e8a52d1..a32fac7 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;
}
More information about the Scummvm-git-logs
mailing list