forked from enlightenment/efl
No need for path in font_directory, and use the right key to store/find them
SVN revision: 50999
This commit is contained in:
parent
d408865797
commit
b8b8381576
|
@ -141,21 +141,7 @@ _edje_file_convert(Eet_File *ef, Old_Edje_File *oedf)
|
|||
|
||||
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;
|
||||
|
|
|
@ -856,7 +856,9 @@ _edje_part_recalc_single_text(FLOAT_T sc,
|
|||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3922,7 +3922,7 @@ edje_edit_font_add(Evas_Object *obj, const char* path, const char* alias)
|
|||
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);
|
||||
|
@ -3937,7 +3937,6 @@ edje_edit_font_add(Evas_Object *obj, const char* path, const char* 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);
|
||||
|
||||
|
|
|
@ -374,7 +374,6 @@ struct _Edje_Style_Tag
|
|||
struct _Edje_Font_Directory_Entry
|
||||
{
|
||||
const char *entry; /* the name of the font */
|
||||
const char *path;
|
||||
const char *file; /* the name of the file */
|
||||
};
|
||||
|
||||
|
|
|
@ -344,7 +344,9 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue