X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libi3%2Ffont.c;h=0b276b0b3f52c48f9afe5b3011c1dfcf8bb8dbc9;hb=04b5ec8165d712ed6bfab86006b755b31a73ccc1;hp=3a68cb785007da51964bb61c9a104b80bf72748a;hpb=752b1019162b13ac9975634d5974ebd1f34c14a5;p=i3%2Fi3 diff --git a/libi3/font.c b/libi3/font.c index 3a68cb78..0b276b0b 100644 --- a/libi3/font.c +++ b/libi3/font.c @@ -87,7 +87,7 @@ void set_font(i3Font *font) { * Frees the resources taken by the current font. * */ -void free_font() { +void free_font(void) { /* Close the font and free the info */ xcb_close_font(conn, savedFont->id); if (savedFont->info) @@ -108,7 +108,12 @@ void set_font_colors(xcb_gcontext_t gc, uint32_t foreground, uint32_t background /* * Draws text onto the specified X drawable (normally a pixmap) at the * specified coordinates (from the top left corner of the leftmost, uppermost - * glyph) and using the provided gc. Text can be specified as UCS-2 or UTF-8. + * glyph) and using the provided gc. + * + * Text can be specified as UCS-2 or UTF-8. If it's specified as UCS-2, then + * text_len must be the number of glyphs in the string. If it's specified as + * UTF-8, then text_len must be the number of bytes in the string (not counting + * the null terminator). * */ void draw_text(char *text, size_t text_len, bool is_ucs2, xcb_drawable_t drawable,