Explorar o código

Fixing bold fonts in reverse mode.

Christoph Lohmann %!s(int64=12) %!d(string=hai) anos
pai
achega
f8db65439a
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      st.c

+ 3 - 3
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;