Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir     : e17/libs/evas/src/lib/imaging


Modified Files:
        evas_imaging.c 


Log Message:


evas lets you choose font hinting - in theory. :)
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/imaging/evas_imaging.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- evas_imaging.c      6 Jan 2006 23:05:17 -0000       1.6
+++ evas_imaging.c      27 Feb 2006 14:03:27 -0000      1.7
@@ -63,11 +63,38 @@
    return evas_common_image_get_cache();
 }
 
+static Evas_Font_Hinting_Flags _evas_hinting = EVAS_FONT_HINTING_BYTECODE;
+
+EAPI void
+evas_imaging_font_hinting_set(Evas_Font_Hinting_Flags hinting)
+{
+   _evas_hinting = hinting;
+}
+
+EAPI Evas_Font_Hinting_Flags
+evas_imaging_font_hinting_get(void)
+{
+   return _evas_hinting;
+}
+
+EAPI Evas_Bool
+evas_imaging_font_hinting_can_hint(Evas_Font_Hinting_Flags hinting)
+{
+   Font_Hint_Flags h;
+   
+   h = FONT_BYTECODE_HINT;
+   if (hinting == EVAS_FONT_HINTING_NONE) h = FONT_NO_HINT;
+   else if (hinting == EVAS_FONT_HINTING_AUTO) h = FONT_AUTO_HINT;
+   else if (hinting == EVAS_FONT_HINTING_BYTECODE) h = FONT_BYTECODE_HINT;
+   return evas_common_hinting_available(h);
+}
+
 EAPI Evas_Imaging_Font *
 evas_imaging_font_load(const char *file, const char *key, int size)
 {
    Evas_Imaging_Font *fn;
    RGBA_Font *font;
+   Font_Hint_Flags h;
 
    evas_common_cpu_init();
    evas_common_font_init();
@@ -109,6 +136,11 @@
      {
        font = evas_common_font_load((char *)file, size);
      }
+   h = FONT_BYTECODE_HINT;
+   if (_evas_hinting == EVAS_FONT_HINTING_NONE) h = FONT_NO_HINT;
+   else if (_evas_hinting == EVAS_FONT_HINTING_AUTO) h = FONT_AUTO_HINT;
+   else if (_evas_hinting == EVAS_FONT_HINTING_BYTECODE) h = 
FONT_BYTECODE_HINT;
+   if (font) evas_common_font_hinting_set(font, h);
    fn = calloc(1, sizeof(RGBA_Font));
    if (!fn) return NULL;
    fn->font = font;




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to