if (oedf->font_dir)
EINA_LIST_FOREACH(oedf->font_dir->entries, l, fnt)
- {
- char *tmp;
- int length;
-
- length = strlen(fnt->entry) + 7;
- tmp = alloca(length);
-
- snprintf(tmp, length, "fonts/%s", fnt->entry);
- fnt->path = eina_stringshare_add(tmp);
- if (edf->free_strings)
- eina_stringshare_del(fnt->entry);
- fnt->entry = fnt->path + 6;
-
- eina_hash_direct_add(edf->fonts, fnt->entry, fnt);
- }
+ eina_hash_direct_add(edf->fonts, fnt->entry, fnt);
if (!_edje_file_convert_images(edf, oedf))
goto on_error;
if (fnt)
{
- font = fnt->path;
+ int len = strlen(fnt->entry) + sizeof("edje/fonts/") + 1;
+ font = alloca(len);
+ sprintf((char *)font, "edje/fonts/%s", fnt->entry);
inlined_font = 1;
}
}
if ((alias = strrchr(path, '/'))) alias ++;
else alias = (char *)path;
}
- snprintf(entry, sizeof(entry), "fonts/%s", alias);
+ snprintf(entry, sizeof(entry), "edje/fonts/%s", alias);
/* Check if exists */
fnt = eina_hash_find(ed->file->fonts, alias);
return EINA_FALSE;
}
fnt->entry = eina_stringshare_add(alias);
- fnt->path = eina_stringshare_add(entry);
eina_hash_direct_add(ed->file->fonts, fnt->entry, fnt);
struct _Edje_Font_Directory_Entry
{
const char *entry; /* the name of the font */
- const char *path;
const char *file; /* the name of the file */
};
if (fnt)
{
- font = fnt->path;
+ int len = strlen(fnt->entry) + sizeof("edje/fonts/") + 1;
+ font = alloca(len);
+ sprintf((char *)font, "edje/fonts/%s", fnt->entry);
inlined_font = 1;
}
}