-/* Searches the :script, :lang, and :otf extra-bundle properties of the spec
- for something that can be mapped to a unicode script. Empty string returned
- if no script spec found.
- TODO: Eventually registry / encoding should be checked and mapped, but for
- now the font backend will try script/lang/otf if registry fails, so it is
- not needed. */
+/* Convert a font registry, such as */
+static NSString
+*ns_registry_to_script (char *reg)
+{
+ Lisp_Object script, r, rts = Vns_reg_to_script;
+ while CONSP (rts)
+ {
+ r = XCAR (XCAR (rts));
+ if (!strncmp(SDATA(r), reg, strlen(SDATA(r))))
+ {
+ script = XCDR (XCAR (rts));
+ return [NSString stringWithUTF8String: SDATA (SYMBOL_NAME (script))];
+ }
+ rts = XCDR (rts);
+ }
+ return @"";
+}
+
+
+/* Searches the :script, :lang, and :otf extra-bundle properties of the spec,
+ plus registry regular property, for something that can be mapped to a
+ unicode script. Empty string returned if no script spec found. */