Add script to/from ISO 15924 tag support

Also adds --script support to hb-view.

If a script tag is not known to us, we pass the ISO 15924 tag around.
Right now, the OT layer ignores that, but we can fix it to blindly
convert that to an OT script tag.
diff --git a/src/hb-view.c b/src/hb-view.c
index b5fb670..fd9fec7 100644
--- a/src/hb-view.c
+++ b/src/hb-view.c
@@ -55,6 +55,7 @@
 static const char *font_file = NULL;
 static const char *out_file = "/dev/stdout";
 static const char *language = NULL;
+static const char *script = NULL;
 
 /* Ugh, global vars.  Ugly, but does the job */
 static int width = 0;
@@ -97,6 +98,7 @@
 	{"foreground", 1, 0, 'F'},
 	{"background", 1, 0, 'B'},
 	{"language", 1, 0, 'L'},
+	{"script", 1, 0, 'S'},
 	{"output", 1, 0, 'o'},
 	{0, 0, 0, 0}
       };
@@ -143,6 +145,9 @@
 	case 'L':
 	  language = optarg;
 	  break;
+	case 'S':
+	  script = optarg;
+	  break;
 	case 'o':
 	  out_file = optarg;
 	  break;
@@ -184,7 +189,10 @@
   hb_buffer_set_unicode_funcs (hb_buffer, hb_glib_get_unicode_funcs ());
 
   hb_buffer_add_utf8 (hb_buffer, text, len, 0, len);
-  hb_buffer_set_script (hb_buffer, HB_SCRIPT_INVALID);
+  if (script)
+    hb_buffer_set_script (hb_buffer, hb_script_from_iso15924_tag (hb_tag_from_string (script)));
+  else
+    hb_buffer_set_script (hb_buffer, HB_SCRIPT_INVALID);
   hb_buffer_set_direction (hb_buffer, HB_DIRECTION_INVALID);
   hb_buffer_set_language (hb_buffer, hb_language_from_string (language));