aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2023-04-30 10:42:05 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2023-04-30 10:42:05 +0200
commit2fe11f2546b08ab6257bdb594606600087c270e6 (patch)
treee31ba1b39464b026b3db9b6da5c5e882012e58ec
parenta21031d5d8dcdd1b95c48eeeb1a92c28abf85d6f (diff)
fix bold is bright
-rw-r--r--drw.c2
-rw-r--r--swt.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/drw.c b/drw.c
index 766220d..5297ab1 100644
--- a/drw.c
+++ b/drw.c
@@ -452,7 +452,7 @@ draw_char(Canvas *canvas, FontCache *fontcache, uint_least32_t charcode, unsigne
stroke_size = 0;
}
- FT_Stroker_Set(font->stroke, stroke_size, FT_STROKER_LINECAP_BUTT, FT_STROKER_LINEJOIN_ROUND, 0);
+ FT_Stroker_Set(font->stroke, stroke_size, FT_STROKER_LINECAP_SQUARE, FT_STROKER_LINEJOIN_BEVEL, 0);
cg = load_bitmap(font, charcode);
diff --git a/swt.c b/swt.c
index 6a9b5b3..82376c6 100644
--- a/swt.c
+++ b/swt.c
@@ -224,11 +224,11 @@ get_color(uint32_t i, ushort mode)
return i;
}
- if ((mode & ATTR_BOLD) && i >= 0 && i < 8) {
- if (!BETWEEN(i + 8, 0, sizeof(colors) / sizeof(uint32_t))) {
- return i;
+ if ((mode & ATTR_BOLD)) {
+ if (!BETWEEN(i - 8, 0, sizeof(colors) / sizeof(uint32_t))) {
+ return colors[i];
}
- return colors[i + 8];
+ return colors[i - 8];
}
return colors[i];