Enlightenment CVS committal Author : barbieri Project : e17 Module : libs/edje
Dir : e17/libs/edje/src/lib Modified Files: edje_textblock_styles.c Log Message: Escape font name before writing it to fixed buffer. Font names can contain spaces, either in the file name and the fontconfig, so do the escape and keep words linked. Now it's possible to have things like: font=Vera\\ Sans:style=Bold and it will work. (note double \\ is required) =================================================================== RCS file: /cvs/e/e17/libs/edje/src/lib/edje_textblock_styles.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- edje_textblock_styles.c 8 Sep 2007 18:31:56 -0000 1.13 +++ edje_textblock_styles.c 18 Jan 2008 20:51:03 -0000 1.14 @@ -440,9 +440,14 @@ /* Add font name last to save evas from multiple loads */ if (tag->font) { + char *tmp; buf = _edje_strbuf_append(buf, " ", &buflen, &bufalloc); buf = _edje_strbuf_append(buf, "font=", &buflen, &bufalloc); - buf = _edje_strbuf_append(buf, tag->font, &buflen, &bufalloc); + tmp = _edje_str_escape(tag->font); + if (tmp) { + buf = _edje_strbuf_append(buf, tmp, &buflen, &bufalloc); + free(tmp); + } } buf = _edje_strbuf_append(buf, "'", &buflen, &bufalloc); } ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs