forked from enlightenment/efl
Save font filename in eet. By Masaki
Author: Thiago Ribeiro Masaki <masaki at profusion.mobi> SVN revision: 45869
This commit is contained in:
parent
fc415b4776
commit
2ab186175e
|
@ -864,6 +864,7 @@ st_fonts_font(void)
|
|||
{
|
||||
fnt = mem_alloc(SZ(Edje_Font_Directory_Entry));
|
||||
fnt->entry = mem_strdup(fn->name);
|
||||
fnt->file = mem_strdup(fn->file);
|
||||
edje_file->font_dir->entries = eina_list_append(edje_file->font_dir->entries, fnt);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -88,6 +88,7 @@ _edje_edd_init(void)
|
|||
_edje_edd_edje_font_directory_entry =
|
||||
eet_data_descriptor_file_new(&eddc);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_font_directory_entry, Edje_Font_Directory_Entry, "entry", entry, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_font_directory_entry, Edje_Font_Directory_Entry, "file", file, EET_T_STRING);
|
||||
|
||||
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Font_Directory);
|
||||
_edje_edd_edje_font_directory =
|
||||
|
|
|
@ -3773,7 +3773,7 @@ edje_edit_fonts_list_get(Evas_Object *obj)
|
|||
|
||||
EINA_LIST_FOREACH(ed->file->font_dir->entries, l, f)
|
||||
{
|
||||
fonts = eina_list_append(fonts, eina_stringshare_add(f->entry));
|
||||
fonts = eina_list_append(fonts, f);
|
||||
//printf(" Font: %s (%s) \n", f->entry, f->path);
|
||||
}
|
||||
|
||||
|
@ -5929,6 +5929,7 @@ _edje_generate_source(Evas_Object *obj)
|
|||
|
||||
Eina_List *l, *ll;
|
||||
char *entry;
|
||||
Edje_Font_Directory_Entry *fnt;
|
||||
|
||||
GET_ED_OR_RETURN(NULL);
|
||||
|
||||
|
@ -5975,13 +5976,12 @@ _edje_generate_source(Evas_Object *obj)
|
|||
{
|
||||
fprintf(f, I0"fonts {\n");
|
||||
|
||||
EINA_LIST_FOREACH(ll, l, entry)
|
||||
EINA_LIST_FOREACH(ll, l, fnt)
|
||||
{
|
||||
// TODO Fixme the filename is wrong
|
||||
fprintf(f, I1"font: \"%s.ttf\" \"%s\";\n", entry, entry);
|
||||
fprintf(f, I1"font: \"%s\" \"%s\";\n", fnt->file, fnt->entry);
|
||||
}
|
||||
fprintf(f, I0"}\n\n");
|
||||
edje_edit_string_list_free(ll);
|
||||
eina_list_free(ll);
|
||||
}
|
||||
|
||||
/* Data */
|
||||
|
|
|
@ -328,6 +328,7 @@ struct _Edje_Font_Directory_Entry
|
|||
{
|
||||
const char *entry; /* the name of the font */
|
||||
const char *path;
|
||||
const char *file; /* the name of the file */
|
||||
};
|
||||
|
||||
/*----------*/
|
||||
|
|
Loading…
Reference in New Issue