diff options
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 32 |
1 files changed, 19 insertions, 13 deletions
@@ -2711,12 +2711,28 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) { | |||
2711 | FcPattern *fcpattern, *fontpattern; | 2711 | FcPattern *fcpattern, *fontpattern; |
2712 | FcFontSet *fcsets[] = { NULL }; | 2712 | FcFontSet *fcsets[] = { NULL }; |
2713 | FcCharSet *fccharset; | 2713 | FcCharSet *fccharset; |
2714 | Colour *fg = &dc.col[base.fg], *bg = &dc.col[base.bg], | 2714 | Colour *fg, *bg, *temp, revfg, revbg; |
2715 | *temp, revfg, revbg; | ||
2716 | XRenderColor colfg, colbg; | 2715 | XRenderColor colfg, colbg; |
2717 | 2716 | ||
2718 | frcflags = FRC_NORMAL; | 2717 | frcflags = FRC_NORMAL; |
2719 | 2718 | ||
2719 | if(base.mode & ATTR_ITALIC) { | ||
2720 | if(base.fg == defaultfg) | ||
2721 | base.fg = defaultitalic; | ||
2722 | font = &dc.ifont; | ||
2723 | frcflags = FRC_ITALIC; | ||
2724 | } else if((base.mode & ATTR_ITALIC) && (base.mode & ATTR_BOLD)) { | ||
2725 | if(base.fg == defaultfg) | ||
2726 | base.fg = defaultitalic; | ||
2727 | font = &dc.ibfont; | ||
2728 | frcflags = FRC_ITALICBOLD; | ||
2729 | } else if(base.mode & ATTR_UNDERLINE) { | ||
2730 | if(base.fg == defaultfg) | ||
2731 | base.fg = defaultunderline; | ||
2732 | } | ||
2733 | fg = &dc.col[base.fg]; | ||
2734 | bg = &dc.col[base.bg]; | ||
2735 | |||
2720 | if(base.mode & ATTR_BOLD) { | 2736 | if(base.mode & ATTR_BOLD) { |
2721 | if(BETWEEN(base.fg, 0, 7)) { | 2737 | if(BETWEEN(base.fg, 0, 7)) { |
2722 | /* basic system colors */ | 2738 | /* basic system colors */ |
@@ -2738,15 +2754,6 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) { | |||
2738 | frcflags = FRC_BOLD; | 2754 | frcflags = FRC_BOLD; |
2739 | } | 2755 | } |
2740 | 2756 | ||
2741 | if(base.mode & ATTR_ITALIC) { | ||
2742 | font = &dc.ifont; | ||
2743 | frcflags = FRC_ITALIC; | ||
2744 | } | ||
2745 | if((base.mode & ATTR_ITALIC) && (base.mode & ATTR_BOLD)) { | ||
2746 | font = &dc.ibfont; | ||
2747 | frcflags = FRC_ITALICBOLD; | ||
2748 | } | ||
2749 | |||
2750 | if(IS_SET(MODE_REVERSE)) { | 2757 | if(IS_SET(MODE_REVERSE)) { |
2751 | if(fg == &dc.col[defaultfg]) { | 2758 | if(fg == &dc.col[defaultfg]) { |
2752 | fg = &dc.col[defaultbg]; | 2759 | fg = &dc.col[defaultbg]; |
@@ -2873,8 +2880,7 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) { | |||
2873 | FcTrue, fcpattern, &fcres); | 2880 | FcTrue, fcpattern, &fcres); |
2874 | 2881 | ||
2875 | /* | 2882 | /* |
2876 | * Overwrite or create the new cache entry | 2883 | * Overwrite or create the new cache entry. |
2877 | * entry. | ||
2878 | */ | 2884 | */ |
2879 | frccur++; | 2885 | frccur++; |
2880 | frclen++; | 2886 | frclen++; |