forked from enlightenment/efl
parent
7462681dad
commit
792762f2d5
|
@ -88,7 +88,7 @@ evas_font_load(Evas *evas, char *name, char *source, int size)
|
||||||
char *nm;
|
char *nm;
|
||||||
|
|
||||||
nm = l->data;
|
nm = l->data;
|
||||||
if (l == fonts)
|
if ((l == fonts) || (!font))
|
||||||
{
|
{
|
||||||
#ifdef BUILD_FONT_LOADER_EET
|
#ifdef BUILD_FONT_LOADER_EET
|
||||||
if (source)
|
if (source)
|
||||||
|
@ -148,7 +148,7 @@ evas_font_load(Evas *evas, char *name, char *source, int size)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int ok = 0;
|
void *ok = NULL;
|
||||||
|
|
||||||
#ifdef BUILD_FONT_LOADER_EET
|
#ifdef BUILD_FONT_LOADER_EET
|
||||||
if (source)
|
if (source)
|
||||||
|
@ -160,7 +160,7 @@ evas_font_load(Evas *evas, char *name, char *source, int size)
|
||||||
if (fake_name)
|
if (fake_name)
|
||||||
{
|
{
|
||||||
/* FIXME: make an engine func */
|
/* FIXME: make an engine func */
|
||||||
if (!evas_common_font_add(font, fake_name, size))
|
if (!evas->engine.func->font_add(evas->engine.data.output, font, fake_name, size))
|
||||||
{
|
{
|
||||||
/* read original!!! */
|
/* read original!!! */
|
||||||
ef = eet_open(source, EET_FILE_MODE_READ);
|
ef = eet_open(source, EET_FILE_MODE_READ);
|
||||||
|
@ -172,14 +172,14 @@ evas_font_load(Evas *evas, char *name, char *source, int size)
|
||||||
fdata = eet_read(ef, nm, &fsize);
|
fdata = eet_read(ef, nm, &fsize);
|
||||||
if ((fdata) && (fsize > 0))
|
if ((fdata) && (fsize > 0))
|
||||||
{
|
{
|
||||||
ok = evas_common_font_memory_add(font, fake_name, size, fdata, fsize);
|
ok = evas->engine.func->font_memory_add(evas->engine.data.output, font, fake_name, size, fdata, fsize);
|
||||||
free(fdata);
|
free(fdata);
|
||||||
}
|
}
|
||||||
eet_close(ef);
|
eet_close(ef);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ok = 1;
|
ok = (void *)1;
|
||||||
free(fake_name);
|
free(fake_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -187,7 +187,7 @@ evas_font_load(Evas *evas, char *name, char *source, int size)
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
if (evas_file_path_is_full_path((char *)nm))
|
if (evas_file_path_is_full_path((char *)nm))
|
||||||
evas_common_font_add(font, (char *)nm, size);
|
evas->engine.func->font_add(evas->engine.data.output, font, (char *)nm, size);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Evas_List *l;
|
||||||
|
@ -199,7 +199,7 @@ evas_font_load(Evas *evas, char *name, char *source, int size)
|
||||||
f_file = evas_font_dir_cache_find(l->data, (char *)nm);
|
f_file = evas_font_dir_cache_find(l->data, (char *)nm);
|
||||||
if (f_file)
|
if (f_file)
|
||||||
{
|
{
|
||||||
if (evas_common_font_add(font, f_file, size))
|
if (evas->engine.func->font_add(evas->engine.data.output, font, f_file, size))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -321,7 +321,7 @@ evas_common_font_load(const char *name, int size)
|
||||||
return fn;
|
return fn;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
RGBA_Font *
|
||||||
evas_common_font_add(RGBA_Font *fn, const char *name, int size)
|
evas_common_font_add(RGBA_Font *fn, const char *name, int size)
|
||||||
{
|
{
|
||||||
RGBA_Font_Int *fi;
|
RGBA_Font_Int *fi;
|
||||||
|
@ -330,12 +330,12 @@ evas_common_font_add(RGBA_Font *fn, const char *name, int size)
|
||||||
if (fi)
|
if (fi)
|
||||||
{
|
{
|
||||||
fn->fonts = evas_list_append(fn->fonts, fi);
|
fn->fonts = evas_list_append(fn->fonts, fi);
|
||||||
return 1;
|
return fn;
|
||||||
}
|
}
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
RGBA_Font *
|
||||||
evas_common_font_memory_add(RGBA_Font *fn, const char *name, int size, const void *data, int data_size)
|
evas_common_font_memory_add(RGBA_Font *fn, const char *name, int size, const void *data, int data_size)
|
||||||
{
|
{
|
||||||
RGBA_Font_Int *fi;
|
RGBA_Font_Int *fi;
|
||||||
|
@ -344,9 +344,9 @@ evas_common_font_memory_add(RGBA_Font *fn, const char *name, int size, const voi
|
||||||
if (fi)
|
if (fi)
|
||||||
{
|
{
|
||||||
fn->fonts = evas_list_append(fn->fonts, fi);
|
fn->fonts = evas_list_append(fn->fonts, fi);
|
||||||
return 1;
|
return fn;
|
||||||
}
|
}
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -888,8 +888,8 @@ void evas_common_font_source_free (RGBA_Font_Source *fs);
|
||||||
void evas_common_font_size_use (RGBA_Font *fn);
|
void evas_common_font_size_use (RGBA_Font *fn);
|
||||||
RGBA_Font *evas_common_font_memory_load (const char *name, int size, const void *data, int data_size);
|
RGBA_Font *evas_common_font_memory_load (const char *name, int size, const void *data, int data_size);
|
||||||
RGBA_Font *evas_common_font_load (const char *name, int size);
|
RGBA_Font *evas_common_font_load (const char *name, int size);
|
||||||
int evas_common_font_add (RGBA_Font *fn, const char *name, int size);
|
RGBA_Font *evas_common_font_add (RGBA_Font *fn, const char *name, int size);
|
||||||
int evas_common_font_memory_add (RGBA_Font *fn, const char *name, int size, const void *data, int data_size);
|
RGBA_Font *evas_common_font_memory_add (RGBA_Font *fn, const char *name, int size, const void *data, int data_size);
|
||||||
RGBA_Font_Int *evas_common_font_int_load_init (RGBA_Font_Int *fn);
|
RGBA_Font_Int *evas_common_font_int_load_init (RGBA_Font_Int *fn);
|
||||||
void evas_common_font_free (RGBA_Font *fn);
|
void evas_common_font_free (RGBA_Font *fn);
|
||||||
void evas_common_font_int_modify_cache_by(RGBA_Font_Int *fi, int dir);
|
void evas_common_font_int_modify_cache_by(RGBA_Font_Int *fi, int dir);
|
||||||
|
|
|
@ -593,8 +593,8 @@ struct _Evas_Func
|
||||||
|
|
||||||
void *(*font_load) (void *data, char *name, int size);
|
void *(*font_load) (void *data, char *name, int size);
|
||||||
void *(*font_memory_load) (void *data, char *name, int size, const void *fdata, int fdata_size);
|
void *(*font_memory_load) (void *data, char *name, int size, const void *fdata, int fdata_size);
|
||||||
void *(*font_add) (void *data, char *name, int size);
|
void *(*font_add) (void *data, void *font, char *name, int size);
|
||||||
void *(*font_memory_add) (void *data, char *name, int size, const void *fdata, int fdata_size);
|
void *(*font_memory_add) (void *data, void *font, char *name, int size, const void *fdata, int fdata_size);
|
||||||
void (*font_free) (void *data, void *font);
|
void (*font_free) (void *data, void *font);
|
||||||
int (*font_ascent_get) (void *data, void *font);
|
int (*font_ascent_get) (void *data, void *font);
|
||||||
int (*font_descent_get) (void *data, void *font);
|
int (*font_descent_get) (void *data, void *font);
|
||||||
|
|
Loading…
Reference in New Issue