Upgrade to latest harfbuzz
[framework/uifw/harfbuzz.git] / src / main.cc
index 2e0927a..07d3d69 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007,2008,2009  Red Hat, Inc.
+ * Copyright © 2007,2008,2009  Red Hat, Inc.
  *
  *  This is part of HarfBuzz, a text shaping library.
  *
@@ -24,9 +24,9 @@
  * Red Hat Author(s): Behdad Esfahbod
  */
 
-#define HB_OT_LAYOUT_CC
+#include "hb-mutex-private.hh"
 #include "hb-open-file-private.hh"
-#include "hb-ot-layout-gdef-private.hh"
+#include "hb-ot-layout-gdef-table.hh"
 #include "hb-ot-layout-gsubgpos-private.hh"
 
 #ifdef HAVE_GLIB
@@ -35,6 +35,8 @@
 #include <stdlib.h>
 #include <stdio.h>
 
+
+
 int
 main (int argc, char **argv)
 {
@@ -47,7 +49,7 @@ main (int argc, char **argv)
   int len = 0;
 
 #ifdef HAVE_GLIB
-  GMappedFile *mf = g_mapped_file_new (argv[1], FALSE, NULL);
+  GMappedFile *mf = g_mapped_file_new (argv[1], false, NULL);
   font_data = g_mapped_file_get_contents (mf);
   len = g_mapped_file_get_length (mf);
 #else
@@ -73,6 +75,12 @@ main (int argc, char **argv)
   case OpenTypeFontFile::TTCTag:
     printf ("TrueType Collection of OpenType fonts\n");
     break;
+  case OpenTypeFontFile::TrueTag:
+    printf ("Obsolete Apple TrueType font\n");
+    break;
+  case OpenTypeFontFile::Typ1Tag:
+    printf ("Obsolete Apple Type1 font in SFNT container\n");
+    break;
   default:
     printf ("Unknown font format\n");
     break;
@@ -116,11 +124,12 @@ main (int argc, char **argv)
            const LangSys &langsys = n_langsys == -1
                                   ? script.get_default_lang_sys ()
                                   : script.get_lang_sys (n_langsys);
-           printf (n_langsys == -1
-                  ? "      Default Language System\n"
-                  : "      Language System %2d of %2d: %.4s\n", n_langsys, num_langsys,
-                   (const char *)script.get_lang_sys_tag (n_langsys));
-           if (langsys.get_required_feature_index () == NO_INDEX)
+           if (n_langsys == -1)
+             printf ("      Default Language System\n");
+           else
+             printf ("      Language System %2d of %2d: %.4s\n", n_langsys, num_langsys,
+                     (const char *)script.get_lang_sys_tag (n_langsys));
+           if (langsys.get_required_feature_index () == Index::NOT_FOUND_INDEX)
              printf ("        No required feature\n");
 
            int num_features = langsys.get_feature_count ();
@@ -152,8 +161,8 @@ main (int argc, char **argv)
        printf ("    %d lookup(s) found in table\n", num_lookups);
        for (int n_lookup = 0; n_lookup < num_lookups; n_lookup++) {
          const Lookup &lookup = g.get_lookup (n_lookup);
-         printf ("    Lookup %2d of %2d: type %d, flags 0x%04X\n", n_lookup, num_lookups,
-                 lookup.get_type(), lookup.get_flag());
+         printf ("    Lookup %2d of %2d: type %d, props 0x%04X\n", n_lookup, num_lookups,
+                 lookup.get_type(), lookup.get_props());
        }
 
        }
@@ -182,3 +191,5 @@ main (int argc, char **argv)
 
   return 0;
 }
+
+