aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEon S. Jeon <esjeon@hyunmu.am>2013-08-11 06:42:30 -0400
committerRoberto E. Vargas Caballero <k0ga@shike2.com>2013-08-30 07:50:05 +0200
commitf3d438b1015a031bc543bb2d65c81cc2329787d4 (patch)
tree5eb7150d9f6029b40a7ecff809f1e76f9f551519
parent587bc939f63b49c6155c4f1fdf97e73380207446 (diff)
downloadst-f3d438b1015a031bc543bb2d65c81cc2329787d4.tar.gz
st-f3d438b1015a031bc543bb2d65c81cc2329787d4.zip
Regarding commit 7e3cff3
Hello. I reviewed and tested commit 7e3cff3, and made a patch that fixes some problems in it. 1. There's a semicolon after an if statement, which is obviously a typo. 2. The current way of calculating text position in "xdraws" yields inconsistent results in some cases. This is due to the use of "font->width", which varies. Instead, "xw.cw" has to be used as the character width. Sincerely, Eon
-rw-r--r--st.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/st.c b/st.c
index 9733a9b..c751aa1 100644
--- a/st.c
+++ b/st.c
@@ -3111,7 +3111,7 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
3111 winy + font->ascent, 3111 winy + font->ascent,
3112 (FcChar8 *)u8fs, 3112 (FcChar8 *)u8fs,
3113 u8fblen); 3113 u8fblen);
3114 xp += CEIL(font->width * cwscale * u8fl); 3114 xp += xw.cw * u8fl;
3115 3115
3116 } 3116 }
3117 break; 3117 break;
@@ -3121,7 +3121,7 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
3121 u8fblen += u8cblen; 3121 u8fblen += u8cblen;
3122 } 3122 }
3123 if(doesexist) { 3123 if(doesexist) {
3124 if (oneatatime); 3124 if (oneatatime)
3125 continue; 3125 continue;
3126 break; 3126 break;
3127 } 3127 }
@@ -3184,7 +3184,7 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
3184 xp, winy + frc[i].font->ascent, 3184 xp, winy + frc[i].font->ascent,
3185 (FcChar8 *)u8c, u8cblen); 3185 (FcChar8 *)u8c, u8cblen);
3186 3186
3187 xp += CEIL(font->width * cwscale); 3187 xp += xw.cw;
3188 } 3188 }
3189 3189
3190 /* 3190 /*