Enlightenment CVS committal

Author  : stffrdhrn
Project : e17
Module  : libs/evas

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


Modified Files:
        evas_font_dir.c 


Log Message:
Evas Fontconfig changes
 * Move evas fontconfig changes out of the search loop
 * Use the whole font name for the search pattern this allow things like
   "Bitstream Vera Serif,Kochi Gothic" so you can manually setup fallbacks

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_font_dir.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- evas_font_dir.c     19 Mar 2006 04:29:57 -0000      1.16
+++ evas_font_dir.c     19 Mar 2006 11:17:43 -0000      1.17
@@ -239,43 +239,6 @@
 #ifdef BUILD_FONT_LOADER_EET
               }
 #endif
-#ifdef HAVE_FONTCONFIG
-            if (!font) /* Search using fontconfig */
-              {
-                 FcPattern *p_nm = NULL;
-                 FcFontSet *set;
-                 FcResult res;
-                 int i;
-
-                 p_nm = FcNameParse(nm);
-                 FcConfigSubstitute(NULL, p_nm, FcMatchPattern);
-                 FcDefaultSubstitute(p_nm);
-
-                 /* do matching */
-                 set = FcFontSort(NULL, p_nm, FcTrue, NULL, &res);
-                 
-                 /* Do loading for all in family */
-                 for (i = 0; i < set->nfont; i++)
-                   {
-                      FcValue filename;
-                      
-                      FcPatternGet(set->fonts[i], FC_FILE, 0, &filename);      
-                      
-                      if (font)
-                        evas->engine.func->font_add(evas->engine.data.output, 
font, filename.u.s, size);
-                      else 
-                        font = 
evas->engine.func->font_load(evas->engine.data.output, filename.u.s, size);     
               
-                   }
- 
-                 FcFontSetDestroy(set); 
-                 FcPatternDestroy(p_nm);
-                 
-                 if (font)
-                   {
-                      break;
-                   }
-              }
-#endif
          }
        else /* Base font loaded, append others */
          {
@@ -342,6 +305,41 @@
        evas_stringshare_del(nm);
      }
    evas_list_free(fonts);
+
+#ifdef HAVE_FONTCONFIG
+            
+   if (!font) /* Search using fontconfig */
+     {   
+       FcPattern *p_nm = NULL;
+       FcFontSet *set;
+       FcResult res;
+       int i;
+
+       p_nm = FcNameParse(name);
+       FcConfigSubstitute(NULL, p_nm, FcMatchPattern);
+       FcDefaultSubstitute(p_nm);
+
+       /* do matching */
+       set = FcFontSort(NULL, p_nm, FcTrue, NULL, &res);
+                 
+       /* Do loading for all in family */
+       for (i = 0; i < set->nfont; i++)
+         {
+            FcValue filename;
+                              
+            FcPatternGet(set->fonts[i], FC_FILE, 0, &filename);        
+                      
+            if (font)
+              evas->engine.func->font_add(evas->engine.data.output, font, 
filename.u.s, size);
+            else 
+              font = evas->engine.func->font_load(evas->engine.data.output, 
filename.u.s, size);                           
+         }
+         
+       FcFontSetDestroy(set); 
+       FcPatternDestroy(p_nm);
+     }
+#endif
+   
    fd = calloc(1, sizeof(Fndat));
    if (fd)
      {




-------------------------------------------------------
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