[poppler] Branch 'xpdf303merge' - fofi/FoFiType1C.cc fofi/FoFiType1C.h

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Fri Sep 2 09:24:34 PDT 2011


 fofi/FoFiType1C.cc |   12 ++++++++++++
 fofi/FoFiType1C.h  |    4 ++++
 2 files changed, 16 insertions(+)

New commits:
commit 738a6954da01fd3fc8c1cd5baa49fc7b8c959169
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Fri Sep 2 18:24:04 2011 +0200

    xpdf303: Add getGlyphName() to FoFiType1C

diff --git a/fofi/FoFiType1C.cc b/fofi/FoFiType1C.cc
index 76931d7..78c212e 100644
--- a/fofi/FoFiType1C.cc
+++ b/fofi/FoFiType1C.cc
@@ -116,6 +116,18 @@ char **FoFiType1C::getEncoding() {
   return encoding;
 }
 
+GooString *FoFiType1C::getGlyphName(int gid) {
+  char buf[256];
+  GBool ok;
+
+  ok = gTrue;
+  getString(charset[gid], buf, &ok);
+  if (!ok) {
+    return NULL;
+  }
+  return new GooString(buf);
+}
+
 int *FoFiType1C::getCIDToGIDMap(int *nCIDs) {
   int *map;
   int n, i;
diff --git a/fofi/FoFiType1C.h b/fofi/FoFiType1C.h
index a1dd3ee..2c8d1ba 100644
--- a/fofi/FoFiType1C.h
+++ b/fofi/FoFiType1C.h
@@ -161,6 +161,10 @@ public:
   // be NULL).  This is only useful with 8-bit fonts.
   char **getEncoding();
 
+  // Get the glyph names.
+  int getNumGlyphs() { return nGlyphs; }
+  GooString *getGlyphName(int gid);
+
   // Return the mapping from CIDs to GIDs, and return the number of
   // CIDs in *<nCIDs>.  This is only useful for CID fonts.
   int *getCIDToGIDMap(int *nCIDs);


More information about the poppler mailing list