src/dump-emoji.cc |   21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

New commits:
commit 27e095a613ed0a753231405cab887da19e9aecd1
Author: Ebrahim Byagowi <[email protected]>
Date:   Mon Oct 15 12:04:14 2018 +0330

    [dump-emoji] better explaination of the usage

diff --git a/src/dump-emoji.cc b/src/dump-emoji.cc
index b5ec30ea..f14dbdbf 100644
--- a/src/dump-emoji.cc
+++ b/src/dump-emoji.cc
@@ -211,10 +211,29 @@ static void dump_glyphs (cairo_font_face_t *cairo_face, 
unsigned int upem,
 int main (int argc, char **argv)
 {
   if (argc != 2) {
-    fprintf (stderr, "usage: %s font-file.ttf\n", argv[0]);
+    fprintf (stderr, "usage: %s font-file.ttf\n"
+                    "run it like `rm -rf out && mkdir out && src/dump-emoji 
font-file.ttf`\n",
+                    argv[0]);
     exit (1);
   }
 
+
+  FILE *font_name_file = fopen ("out/_font_name_file.txt", "r");
+  if (font_name_file != nullptr)
+  {
+    fprintf (stderr, "Purge or move ./out folder in order to run a new 
dump\n");
+    exit (1);
+  }
+
+  font_name_file = fopen ("out/_font_name_file.txt", "w");
+  if (font_name_file == nullptr)
+  {
+    fprintf (stderr, "./out is not accessible, create it please\n");
+    exit (1);
+  }
+  fwrite (argv[0], 1, strlen (argv[1]), font_name_file);
+  fclose (font_name_file);
+
   hb_blob_t *blob = hb_blob_create_from_file (argv[1]);
   hb_face_t *face = hb_face_create (blob, 0);
   hb_font_t *font = hb_font_create (face);
_______________________________________________
HarfBuzz mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/harfbuzz

Reply via email to