summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--font.c5
-rw-r--r--menu.c10
2 files changed, 7 insertions, 8 deletions
diff --git a/font.c b/font.c
index 6ab2b51..cc24eaf 100644
--- a/font.c
+++ b/font.c
@@ -66,7 +66,7 @@ font_width(struct screen_ctx *sc, const char *text, int len)
 {
 	XGlyphInfo	 extents;
 
-	XftTextExtents8(X_Dpy, sc->font, (const XftChar8*)text,
+	XftTextExtentsUtf8(X_Dpy, sc->font, (const FcChar8*)text,
 	    len, &extents);
 
 	return (extents.xOff);
@@ -77,8 +77,7 @@ font_draw(struct screen_ctx *sc, const char *text, int len,
     Drawable d, int x, int y)
 {
 	XftDrawChange(sc->xftdraw, d);
-	/* Really needs to be UTF8'd. */
-	XftDrawString8(sc->xftdraw, &sc->xftcolor, sc->font, x, y,
+	XftDrawStringUtf8(sc->xftdraw, &sc->xftcolor, sc->font, x, y,
 	    (const FcChar8*)text, len);
 }
 
diff --git a/menu.c b/menu.c
index 04870fe..c8d63ac 100644
--- a/menu.c
+++ b/menu.c
@@ -31,8 +31,8 @@
 
 #include "calmwm.h"
 
-#define PROMPT_SCHAR	'»'
-#define PROMPT_ECHAR	'«'
+#define PROMPT_SCHAR	"\xc2\xbb"
+#define PROMPT_ECHAR	"\xc2\xab"
 
 enum ctltype {
 	CTL_NONE = -1,
@@ -118,9 +118,9 @@ menu_filter(struct screen_ctx *sc, struct menu_q *menuq, char *prompt,
 		mc.list = 1;
 	} else {
 		evmask = MenuMask | KeyMask; /* only accept keys if prompt */
-		snprintf(mc.promptstr, sizeof(mc.promptstr), "%s%c", prompt,
+		snprintf(mc.promptstr, sizeof(mc.promptstr), "%s%s", prompt,
 		    PROMPT_SCHAR);
-		snprintf(mc.dispstr, sizeof(mc.dispstr), "%s%s%c", mc.promptstr,
+		snprintf(mc.dispstr, sizeof(mc.dispstr), "%s%s%s", mc.promptstr,
 		    mc.searchstr, PROMPT_ECHAR);
 		mc.width = font_width(sc, mc.dispstr, strlen(mc.dispstr));
 		mc.hasprompt = 1;
@@ -312,7 +312,7 @@ menu_draw(struct screen_ctx *sc, struct menu_ctx *mc, struct menu_q *menuq,
 	mc->width = 0;
 	dy = 0;
 	if (mc->hasprompt) {
-		snprintf(mc->dispstr, sizeof(mc->dispstr), "%s%s%c",
+		snprintf(mc->dispstr, sizeof(mc->dispstr), "%s%s%s",
 		    mc->promptstr, mc->searchstr, PROMPT_ECHAR);
 		mc->width = font_width(sc, mc->dispstr, strlen(mc->dispstr));
 		dy = font_height(sc);