Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/edje
Dir : e17/libs/edje/src/lib
Modified Files:
Edje.h edje_calc.c edje_private.h edje_text.c edje_util.c
Log Message:
suport fontset appends
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/lib/Edje.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -3 -r1.39 -r1.40
--- Edje.h 28 Nov 2004 14:52:01 -0000 1.39
+++ Edje.h 20 Mar 2005 16:49:10 -0000 1.40
@@ -148,6 +148,8 @@
/* edje_util.c */
EAPI void edje_freeze (void);
EAPI void edje_thaw (void);
+ EAPI void edje_fontset_append_set (char *fonts);
+ EAPI const char *edje_fontset_append_get (void);
/* edje_load.c */
EAPI Evas_List *edje_file_collection_list (const char *file);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/lib/edje_calc.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -3 -r1.60 -r1.61
--- edje_calc.c 7 Mar 2005 00:22:58 -0000 1.60
+++ edje_calc.c 20 Mar 2005 16:49:10 -0000 1.61
@@ -535,7 +535,22 @@
if (inlined_font) evas_object_text_font_source_set(ep->object,
ed->path);
else evas_object_text_font_source_set(ep->object, NULL);
- evas_object_text_font_set(ep->object, font, size);
+ if ((_edje_fontset_append) && (font))
+ {
+ char *font2;
+
+ font2 = malloc(strlen(font) + 1 + strlen(_edje_fontset_append) +
1);
+ if (font2)
+ {
+ strcpy(font2, font);
+ strcat(font2, ",");
+ strcat(font2, _edje_fontset_append);
+ evas_object_text_font_set(ep->object, font2, size);
+ free(font2);
+ }
+ }
+ else
+ evas_object_text_font_set(ep->object, font, size);
if ((chosen_desc->text.min_x) || (chosen_desc->text.min_y))
{
int mw, mh;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/lib/edje_private.h,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -3 -r1.81 -r1.82
--- edje_private.h 16 Mar 2005 18:39:39 -0000 1.81
+++ edje_private.h 20 Mar 2005 16:49:10 -0000 1.82
@@ -730,6 +730,7 @@
extern Edje_Text_Style _edje_text_styles[EDJE_TEXT_EFFECT_LAST];
extern Evas_List *_edje_edjes;
+extern char *_edje_fontset_append;
void _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, double pos);
Edje_Part_Description *_edje_part_description_find(Edje *ed, Edje_Real_Part
*rp, char *name, double val);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/lib/edje_text.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -3 -r1.33 -r1.34
--- edje_text.c 1 Dec 2004 04:59:41 -0000 1.33
+++ edje_text.c 20 Mar 2005 16:49:10 -0000 1.34
@@ -502,7 +502,7 @@
Edje_Part_Description *chosen_desc)
{
char *text;
- char *font;
+ char *font, *font2 = NULL;
int size;
Evas_Coord tw, th;
Evas_Coord ox, oy, sw, sh;
@@ -529,7 +529,7 @@
if (ep->text.text) text = ep->text.text;
if (ep->text.font) font = ep->text.font;
if (ep->text.size > 0) size = ep->text.size;
-
+
/* check if the font is embedded in the .eet */
/* FIXME: we should cache this result */
if (ed->file->font_dir)
@@ -551,6 +551,20 @@
}
}
}
+
+ if ((_edje_fontset_append) && (font))
+ {
+ char *font2;
+
+ font2 = malloc(strlen(font) + 1 + strlen(_edje_fontset_append) + 1);
+ if (font2)
+ {
+ strcpy(font2, font);
+ strcat(font2, ",");
+ strcat(font2, _edje_fontset_append);
+ font = font2;
+ }
+ }
ox = _edje_text_styles[ep->part->effect].offset.x;
oy = _edje_text_styles[ep->part->effect].offset.y;
@@ -726,4 +740,6 @@
if (free_text)
free(text);
+ if (font2)
+ free(font2);
}
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/lib/edje_util.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -3 -r1.53 -r1.54
--- edje_util.c 24 Feb 2005 10:25:40 -0000 1.53
+++ edje_util.c 20 Mar 2005 16:49:10 -0000 1.54
@@ -10,6 +10,7 @@
Evas_Hash *_edje_text_class_hash = NULL;
Evas_Hash *_edje_text_class_member_hash = NULL;
+char *_edje_fontset_append = NULL;
/************************** API Routines **************************/
@@ -39,6 +40,23 @@
edje_object_thaw((Evas_Object *)(l->data));
}
+/* FIXDOC: Expand */
+void
+edje_fontset_append_set(char *fonts)
+{
+ if (_edje_fontset_append)
+ free(_edje_fontset_append);
+ _edje_fontset_append = strdup(fonts);
+}
+
+/* FIXDOC: Expand */
+const char *
+edje_fontset_append_get(void)
+{
+ return _edje_fontset_append;
+}
+
+
/* FIXDOC: Verify/Expand */
/** Get Edje object data
* @param obj A valid Evas_Object handle
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs