/* Make sure the style contains a text_class */
EINA_LIST_FOREACH(stl->tags, ll, tag)
- if (tag->text_class) found = 1;
+ {
+ if (tag->text_class)
+ {
+ found = 1;
+ break;
+ }
+ }
/* No text classes , goto next style */
if (!found) continue;
eina_strbuf_append(txt, "='");
/* Configure fonts from text class if it exists */
- if ((tc = _edje_text_class_find(ed, tag->text_class)))
- {
- /* Only update if not clearing, If clear leave it at zero */
- if (tc->font) found = 1;
- }
+ tc = _edje_text_class_find(ed, tag->text_class);
/* Add and Ha`ndle tag parsed data */
eina_strbuf_append(txt, tag->value);
{
char font_size[32];
- if (found)
+ if (tc && tc->size)
snprintf(font_size, sizeof(font_size), "%f", (double) _edje_text_size_calc(tag->font_size, tc));
else
snprintf(font_size, sizeof(font_size), "%f", tag->font_size);
eina_strbuf_append(txt, " ");
eina_strbuf_append(txt, "font=");
- f = (found) ? tc->font : tag->font;
+ f = (tc && tc->font) ? tc->font : tag->font;
eina_strbuf_append_escaped(txt, f);
}
- found = 0;
eina_strbuf_append(txt, "'");
}