diff --git a/include/libi3.h b/include/libi3.h index e693c3ad..7945134c 100644 --- a/include/libi3.h +++ b/include/libi3.h @@ -451,13 +451,6 @@ bool font_is_pango(void); void draw_text(i3String *text, xcb_drawable_t drawable, xcb_gcontext_t gc, xcb_visualtype_t *visual, int x, int y, int max_width); -/** - * ASCII version of draw_text to print static strings. - * - */ -void draw_text_ascii(const char *text, xcb_drawable_t drawable, - xcb_gcontext_t gc, int x, int y, int max_width); - /** * Predict the text width in pixels for the given text. Text must be * specified as an i3String. diff --git a/libi3/font.c b/libi3/font.c index 5ed58b8d..26e90e44 100644 --- a/libi3/font.c +++ b/libi3/font.c @@ -380,41 +380,6 @@ void draw_text(i3String *text, xcb_drawable_t drawable, xcb_gcontext_t gc, } } -/* - * ASCII version of draw_text to print static strings. - * - */ -void draw_text_ascii(const char *text, xcb_drawable_t drawable, - xcb_gcontext_t gc, int x, int y, int max_width) { - assert(savedFont != NULL); - - switch (savedFont->type) { - case FONT_TYPE_NONE: - /* Nothing to do */ - return; - case FONT_TYPE_XCB: { - size_t text_len = strlen(text); - if (text_len > 255) { - /* The text is too long to draw it directly to X */ - i3String *str = i3string_from_utf8(text); - draw_text(str, drawable, gc, NULL, x, y, max_width); - i3string_free(str); - } else { - /* X11 coordinates for fonts start at the baseline */ - int pos_y = y + savedFont->specific.xcb.info->font_ascent; - - xcb_image_text_8(conn, text_len, drawable, gc, x, pos_y, text); - } - break; - } - case FONT_TYPE_PANGO: - /* Render the text using Pango */ - draw_text_pango(text, strlen(text), - drawable, root_visual_type, x, y, max_width, false); - return; - } -} - static int xcb_query_text_width(const xcb_char2b_t *text, size_t text_len) { /* Make the user know we’re using the slow path, but only once. */ static bool first_invocation = true;