unicode ellipsis patch
This commit is contained in:
parent
4f9dcc5d42
commit
e94bdad793
4
drw.c
4
drw.c
@ -274,7 +274,7 @@ drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lp
|
|||||||
|
|
||||||
usedfont = drw->fonts;
|
usedfont = drw->fonts;
|
||||||
if (!ellipsis_width && render)
|
if (!ellipsis_width && render)
|
||||||
ellipsis_width = drw_fontset_getwidth(drw, "...");
|
ellipsis_width = drw_fontset_getwidth(drw, "…");
|
||||||
while (1) {
|
while (1) {
|
||||||
ew = ellipsis_len = utf8strlen = 0;
|
ew = ellipsis_len = utf8strlen = 0;
|
||||||
utf8str = text;
|
utf8str = text;
|
||||||
@ -328,7 +328,7 @@ drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lp
|
|||||||
w -= ew;
|
w -= ew;
|
||||||
}
|
}
|
||||||
if (render && overflow)
|
if (render && overflow)
|
||||||
drw_text(drw, ellipsis_x, y, ellipsis_w, h, 0, "...", invert);
|
drw_text(drw, ellipsis_x, y, ellipsis_w, h, 0, "…", invert);
|
||||||
|
|
||||||
if (!*text || overflow) {
|
if (!*text || overflow) {
|
||||||
break;
|
break;
|
||||||
|
@ -0,0 +1,22 @@
|
|||||||
|
diff --git a/drw.c b/drw.c
|
||||||
|
index ced7d37..95da860 100644
|
||||||
|
--- a/drw.c
|
||||||
|
+++ b/drw.c
|
||||||
|
@@ -285,7 +285,7 @@ drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lp
|
||||||
|
|
||||||
|
usedfont = drw->fonts;
|
||||||
|
if (!ellipsis_width && render)
|
||||||
|
- ellipsis_width = drw_fontset_getwidth(drw, "...");
|
||||||
|
+ ellipsis_width = drw_fontset_getwidth(drw, "…");
|
||||||
|
while (1) {
|
||||||
|
ew = ellipsis_len = utf8strlen = 0;
|
||||||
|
utf8str = text;
|
||||||
|
@@ -339,7 +339,7 @@ drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lp
|
||||||
|
w -= ew;
|
||||||
|
}
|
||||||
|
if (render && overflow)
|
||||||
|
- drw_text(drw, ellipsis_x, y, ellipsis_w, h, 0, "...", invert);
|
||||||
|
+ drw_text(drw, ellipsis_x, y, ellipsis_w, h, 0, "…", invert);
|
||||||
|
|
||||||
|
if (!*text || overflow) {
|
||||||
|
break;
|
Loading…
Reference in New Issue
Block a user