forked from enlightenment/efl
- make sure we have a name before trying to look it up
- strip off an + or - in _format_fill so we don't end up with things like +font=fonts/Vera which then won't match when we try to recognize it as a keyword SVN revision: 17580
This commit is contained in:
parent
347c26ce53
commit
ef2fcdc4c1
|
@ -159,6 +159,8 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
|
|||
Evas_List *fonts, *l;
|
||||
Fndat *fd;
|
||||
|
||||
if (!name) return NULL;
|
||||
|
||||
for (l = fonts_cache; l; l = l->next)
|
||||
{
|
||||
fd = l->data;
|
||||
|
|
|
@ -747,7 +747,7 @@ _format_color_parse(char *str, unsigned char *r, unsigned char *g, unsigned char
|
|||
|
||||
slen = strlen(str);
|
||||
*r = *g = *b = *a = 0;
|
||||
|
||||
|
||||
if (slen == 7) /* #RRGGBB */
|
||||
{
|
||||
*r = (_hex_string_get(str[1]) << 4) | (_hex_string_get(str[2]));
|
||||
|
@ -1128,6 +1128,10 @@ _format_fill(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, char *str)
|
|||
char *item;
|
||||
|
||||
s = str;
|
||||
|
||||
/* get rid of anything +'s or -'s off the start of the string */
|
||||
while ((*s == ' ') || (*s == '+') || (*s == '-')) s++;
|
||||
|
||||
while ((item = _format_parse(&s)))
|
||||
{
|
||||
if (_format_is_param(item))
|
||||
|
|
Loading…
Reference in New Issue