Xinqi Bao's Git
projects
/
st.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Apply ATTR_REVERSE after ATTR_FAINT
[st.git]
/
x.c
diff --git
a/x.c
b/x.c
index
fbfd350
..
474d73b
100644
(file)
--- a/
x.c
+++ b/
x.c
@@
-1092,6
+1092,9
@@
xmakeglyphfontspecs(XftGlyphFontSpec *specs, const Glyph *glyphs, int len, int x
frc[frclen].font = XftFontOpenPattern(xw.dpy,
fontpattern);
frc[frclen].font = XftFontOpenPattern(xw.dpy,
fontpattern);
+ if (!frc[frclen].font)
+ die("XftFontOpenPattern failed seeking fallback font: %s\n",
+ strerror(errno));
frc[frclen].flags = frcflags;
frc[frclen].unicodep = rune;
frc[frclen].flags = frcflags;
frc[frclen].unicodep = rune;
@@
-1186,12
+1189,6
@@
xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i
}
}
}
}
- if (base.mode & ATTR_REVERSE) {
- temp = fg;
- fg = bg;
- bg = temp;
- }
-
if ((base.mode & ATTR_BOLD_FAINT) == ATTR_FAINT) {
colfg.red = fg->color.red / 2;
colfg.green = fg->color.green / 2;
if ((base.mode & ATTR_BOLD_FAINT) == ATTR_FAINT) {
colfg.red = fg->color.red / 2;
colfg.green = fg->color.green / 2;
@@
-1200,6
+1197,13
@@
xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i
fg = &revfg;
}
fg = &revfg;
}
+
+ if (base.mode & ATTR_REVERSE) {
+ temp = fg;
+ fg = bg;
+ bg = temp;
+ }
+
if (base.mode & ATTR_BLINK && term.mode & MODE_BLINK)
fg = bg;
if (base.mode & ATTR_BLINK && term.mode & MODE_BLINK)
fg = bg;