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)


SVN revision: 33526
This commit is contained in:
Gustavo Sverzut Barbieri 2008-01-18 20:51:03 +00:00
parent b45c8367cf
commit 533be6581f
1 changed files with 6 additions and 1 deletions

View File

@ -440,9 +440,14 @@ _edje_textblock_style_parse_and_fix(Edje_File *edf)
/* 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);
}