Fixing bold fonts in reverse mode.
authorChristoph Lohmann <20h@r-36.net>
Sat, 3 Nov 2012 12:43:20 +0000 (13:43 +0100)
committerChristoph Lohmann <20h@r-36.net>
Sat, 3 Nov 2012 12:43:20 +0000 (13:43 +0100)
st.c

diff --git a/st.c b/st.c
index bfbe799..578c7ee 100644 (file)
--- a/st.c
+++ b/st.c
@@ -2398,9 +2398,6 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
                 *temp, revfg, revbg;
        XRenderColor colfg, colbg;
 
-       if(base.mode & ATTR_REVERSE)
-               temp = fg, fg = bg, bg = temp;
-
        if(base.mode & ATTR_BOLD) {
                if(BETWEEN(base.fg, 0, 7)) {
                        /* basic system colors */
@@ -2450,6 +2447,9 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
                }
        }
 
+       if(base.mode & ATTR_REVERSE)
+               temp = fg, fg = bg, bg = temp;
+
        XftTextExtentsUtf8(xw.dpy, font->xft_set, (FcChar8 *)s, bytelen,
                        &extents);
        width = extents.xOff;