Enlightenment CVS committal

Author  : doursse
Project : e17
Module  : proto

Dir     : e17/proto/epdf/src/lib


Modified Files:
        poppler_document.cpp poppler_fontinfo.h poppler_fontinfo.cpp 
        poppler_private.h 


Log Message:
API addition: retrieve of the path (and name) of the font
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/epdf/src/lib/poppler_document.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- poppler_document.cpp        15 Feb 2006 21:45:08 -0000      1.1
+++ poppler_document.cpp        12 Mar 2006 20:15:45 -0000      1.2
@@ -290,13 +290,17 @@
       Evas_Poppler_Font_Info     *font;
       Evas_Poppler_Font_Info     *font2;
       char                       *font_name = NULL;
+      char                       *font_path = NULL;
       int                         index = 0;
 
       if (((::FontInfo*)items->get(i))->getName())
         font_name = ((::FontInfo*)items->get(i))->getName()->getCString();
 
+      if (((::FontInfo*)items->get(i))->getFile())
+        font_path = ((::FontInfo*)items->get(i))->getFile()->getCString();
+
       type = 
(Evas_Poppler_Font_Info_Type)((::FontInfo*)items->get(i))->getType();
-      font = evas_poppler_font_info_new (font_name,
+      font = evas_poppler_font_info_new (font_name, font_path,
                                          
((::FontInfo*)items->get(i))->getEmbedded(),
                                          
((::FontInfo*)items->get(i))->getSubset(),
                                          type);
@@ -310,6 +314,7 @@
         index++;
       font_name = strdup (font->font_name + index);
       font2 = evas_poppler_font_info_new (font_name,
+                                          font_path,
                                           font->is_embedded,
                                           font->is_subset,
                                           font->type);
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/epdf/src/lib/poppler_fontinfo.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- poppler_fontinfo.h  15 Feb 2006 21:45:08 -0000      1.1
+++ poppler_fontinfo.h  12 Mar 2006 20:15:45 -0000      1.2
@@ -22,6 +22,7 @@
  * freed with evas_poppler_font_info_delete.
  */
 Evas_Poppler_Font_Info *evas_poppler_font_info_new (const char                 
*font_name,
+                                                    const char                 
*font_path,
                                                     unsigned char              
 is_embedded,
                                                     unsigned char              
 is_subset,
                                                     
Evas_Poppler_Font_Info_Type type);
@@ -46,6 +47,16 @@
 const char *evas_poppler_font_info_font_name_get (Evas_Poppler_Font_Info *fi);
 
 /**
+ * Get the path of a Evas_Poppler_Font_Info
+ *
+ * @param fi The Evas_Poppler_Font_Info to get the name from
+ * @return The path of the font
+ *
+ * Get the path of a Evas_Poppler_Font_Info. The path must not be freed.
+ */
+const char *evas_poppler_font_info_font_path_get (Evas_Poppler_Font_Info *fi);
+
+/**
  * Whether the font is embedded in the file, or not
  *
  * @param fi The Evas_Poppler_Font_Info
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/epdf/src/lib/poppler_fontinfo.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- poppler_fontinfo.cpp        15 Feb 2006 21:45:08 -0000      1.1
+++ poppler_fontinfo.cpp        12 Mar 2006 20:15:45 -0000      1.2
@@ -7,7 +7,7 @@
 
 
 Evas_Poppler_Font_Info *
-evas_poppler_font_info_new (const char *font_name, unsigned char is_embedded, 
unsigned char is_subset, Evas_Poppler_Font_Info_Type type)
+evas_poppler_font_info_new (const char *font_name, const char *font_path, 
unsigned char is_embedded, unsigned char is_subset, Evas_Poppler_Font_Info_Type 
type)
 {
   Evas_Poppler_Font_Info *fi;
 
@@ -16,6 +16,7 @@
     return NULL;
 
   fi->font_name = strdup (font_name);
+  fi->font_path = strdup (font_path);
   fi->is_embedded = is_embedded;
   fi->is_subset = is_subset;
   fi->type = type;
@@ -32,6 +33,9 @@
   if (fi->font_name)
     free (fi->font_name);
 
+  if (fi->font_path)
+    free (fi->font_path);
+
   free(fi);
 }
 
@@ -44,6 +48,15 @@
   return (const char *)fi->font_name;
 }
 
+const char *
+evas_poppler_font_info_font_path_get (Evas_Poppler_Font_Info *fi)
+{
+  if (!fi)
+    return NULL;
+
+  return (const char *)fi->font_path;
+}
+
 unsigned char
 evas_poppler_font_info_is_embedded_get (Evas_Poppler_Font_Info *fi)
 {
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/epdf/src/lib/poppler_private.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- poppler_private.h   15 Feb 2006 21:45:08 -0000      1.1
+++ poppler_private.h   12 Mar 2006 20:15:45 -0000      1.2
@@ -21,6 +21,7 @@
 struct _Evas_Poppler_Font_Info
 {
   char                       *font_name;
+  char                       *font_path;
   unsigned char               is_embedded;
   unsigned char               is_subset;
   Evas_Poppler_Font_Info_Type type;




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