diff options
| author | Christoph Lohmann <20h@r-36.net> | 2012-11-03 13:43:20 +0100 |
|---|---|---|
| committer | Christoph Lohmann <20h@r-36.net> | 2012-11-03 13:43:20 +0100 |
| commit | f8db65439a705f5e94c7a130ac44689e050e5654 (patch) | |
| tree | f60098cf165a9a68b4ba1be132deec861c4cfdc8 /st.c | |
| parent | Now italic and bold works. (diff) | |
| download | st-f8db65439a705f5e94c7a130ac44689e050e5654.tar.gz st-f8db65439a705f5e94c7a130ac44689e050e5654.zip | |
Fixing bold fonts in reverse mode.
Diffstat (limited to 'st.c')
| -rw-r--r-- | st.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -2398,9 +2398,6 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) { | |||
| 2398 | *temp, revfg, revbg; | 2398 | *temp, revfg, revbg; |
| 2399 | XRenderColor colfg, colbg; | 2399 | XRenderColor colfg, colbg; |
| 2400 | 2400 | ||
| 2401 | if(base.mode & ATTR_REVERSE) | ||
| 2402 | temp = fg, fg = bg, bg = temp; | ||
| 2403 | |||
| 2404 | if(base.mode & ATTR_BOLD) { | 2401 | if(base.mode & ATTR_BOLD) { |
| 2405 | if(BETWEEN(base.fg, 0, 7)) { | 2402 | if(BETWEEN(base.fg, 0, 7)) { |
| 2406 | /* basic system colors */ | 2403 | /* basic system colors */ |
| @@ -2450,6 +2447,9 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) { | |||
| 2450 | } | 2447 | } |
| 2451 | } | 2448 | } |
| 2452 | 2449 | ||
| 2450 | if(base.mode & ATTR_REVERSE) | ||
| 2451 | temp = fg, fg = bg, bg = temp; | ||
| 2452 | |||
| 2453 | XftTextExtentsUtf8(xw.dpy, font->xft_set, (FcChar8 *)s, bytelen, | 2453 | XftTextExtentsUtf8(xw.dpy, font->xft_set, (FcChar8 *)s, bytelen, |
| 2454 | &extents); | 2454 | &extents); |
| 2455 | width = extents.xOff; | 2455 | width = extents.xOff; |
