diff options
| author | Christoph Lohmann <20h@r-36.net> | 2013-04-23 19:17:50 +0200 |
|---|---|---|
| committer | Christoph Lohmann <20h@r-36.net> | 2013-04-23 19:17:50 +0200 |
| commit | db6f796ecfafcee879613b60a772be3e5d9e355e (patch) | |
| tree | 093253d7b88f3b5904207f12f8f9c5581fd9a466 /st.c | |
| parent | 7ea68632081e5adc2f0d2681ac89ed5decfac7b9 (diff) | |
| download | st-db6f796ecfafcee879613b60a772be3e5d9e355e.tar.gz st-db6f796ecfafcee879613b60a772be3e5d9e355e.zip | |
Removing the overdrawing of some fonts.
Diffstat (limited to 'st.c')
| -rw-r--r-- | st.c | 11 |
1 files changed, 11 insertions, 0 deletions
| @@ -36,6 +36,7 @@ char *argv0; | |||
| 36 | #define Draw XftDraw * | 36 | #define Draw XftDraw * |
| 37 | #define Colour XftColor | 37 | #define Colour XftColor |
| 38 | #define Colourmap Colormap | 38 | #define Colourmap Colormap |
| 39 | #define Rectangle XRectangle | ||
| 39 | 40 | ||
| 40 | #if defined(__linux) | 41 | #if defined(__linux) |
| 41 | #include <pty.h> | 42 | #include <pty.h> |
| @@ -2764,6 +2765,7 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) { | |||
| 2764 | FcCharSet *fccharset; | 2765 | FcCharSet *fccharset; |
| 2765 | Colour *fg, *bg, *temp, revfg, revbg; | 2766 | Colour *fg, *bg, *temp, revfg, revbg; |
| 2766 | XRenderColor colfg, colbg; | 2767 | XRenderColor colfg, colbg; |
| 2768 | Rectangle r; | ||
| 2767 | 2769 | ||
| 2768 | frcflags = FRC_NORMAL; | 2770 | frcflags = FRC_NORMAL; |
| 2769 | 2771 | ||
| @@ -2851,6 +2853,11 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) { | |||
| 2851 | 2853 | ||
| 2852 | /* Clean up the region we want to draw to. */ | 2854 | /* Clean up the region we want to draw to. */ |
| 2853 | XftDrawRect(xw.draw, bg, winx, winy, width, xw.ch); | 2855 | XftDrawRect(xw.draw, bg, winx, winy, width, xw.ch); |
| 2856 | r.x = 0; | ||
| 2857 | r.y = 0; | ||
| 2858 | r.height = xw.ch; | ||
| 2859 | r.width = width; | ||
| 2860 | XftDrawSetClipRectangles(xw.draw, winx, winy, &r, 1); | ||
| 2854 | 2861 | ||
| 2855 | fcsets[0] = font->set; | 2862 | fcsets[0] = font->set; |
| 2856 | for(xp = winx; bytelen > 0;) { | 2863 | for(xp = winx; bytelen > 0;) { |
| @@ -2885,6 +2892,7 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) { | |||
| 2885 | (FcChar8 *)u8fs, | 2892 | (FcChar8 *)u8fs, |
| 2886 | u8fblen); | 2893 | u8fblen); |
| 2887 | xp += font->width * u8fl; | 2894 | xp += font->width * u8fl; |
| 2895 | |||
| 2888 | } | 2896 | } |
| 2889 | break; | 2897 | break; |
| 2890 | } | 2898 | } |
| @@ -2969,6 +2977,9 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) { | |||
| 2969 | XftDrawRect(xw.draw, fg, winx, winy + font->ascent + 1, | 2977 | XftDrawRect(xw.draw, fg, winx, winy + font->ascent + 1, |
| 2970 | width, 1); | 2978 | width, 1); |
| 2971 | } | 2979 | } |
| 2980 | |||
| 2981 | /* Reset clip to none. */ | ||
| 2982 | XftDrawSetClip(xw.draw, 0); | ||
| 2972 | } | 2983 | } |
| 2973 | 2984 | ||
| 2974 | void | 2985 | void |
