all repos — st @ 1584956a60f7739e46c5a0cd0e0e8295aa26071c

st (suckless terminal) config

Style cleanup.

Add some note about the main reason why st is still that big.
Christoph Lohmann 20h@r-36.net
commit

1584956a60f7739e46c5a0cd0e0e8295aa26071c

parent

d2ec39f0ef4b9d7f291aeba548a56144fce8a42f

1 files changed, 14 insertions(+), 5 deletions(-)

jump to
M st.cst.c

@@ -3091,6 +3091,7 @@ } else if(base.mode & ATTR_UNDERLINE) {

if(base.fg == defaultfg) base.fg = defaultunderline; } + if(IS_TRUECOL(base.fg)) { colfg.alpha = 0xffff; colfg.red = TRUERED(base.fg);

@@ -3112,8 +3113,6 @@ bg = &truebg;

} else { bg = &dc.col[base.bg]; } - - if(base.mode & ATTR_BOLD) { if(BETWEEN(base.fg, 0, 7)) {

@@ -3144,7 +3143,8 @@ colfg.red = ~fg->color.red;

colfg.green = ~fg->color.green; colfg.blue = ~fg->color.blue; colfg.alpha = fg->color.alpha; - XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colfg, &revfg); + XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colfg, + &revfg); fg = &revfg; }

@@ -3155,7 +3155,8 @@ colbg.red = ~bg->color.red;

colbg.green = ~bg->color.green; colbg.blue = ~bg->color.blue; colbg.alpha = bg->color.alpha; - XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colbg, &revbg); + XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colbg, + &revbg); bg = &revbg; } }

@@ -3235,7 +3236,7 @@ u8fl++;

u8fblen += u8cblen; } if(doesexist) { - if (oneatatime) + if(oneatatime) continue; break; }

@@ -3258,6 +3259,8 @@ /*

* Nothing was found in the cache. Now use * some dozen of Fontconfig calls to get the * font for one single character. + * + * Xft and fontconfig are design failures. */ fcpattern = FcPatternDuplicate(font->pattern); fccharset = FcCharSetCreate();

@@ -3301,6 +3304,12 @@

xp += xw.cw * wcwidth(u8char); } + /* + * This is how the loop above actually should be. Why does the + * application have to care about font details? + * + * I have to repeat: Xft and Fontconfig are design failures. + */ /* XftDrawStringUtf8(xw.draw, fg, font->set, winx, winy + font->ascent, (FcChar8 *)s, bytelen);