(set_debug_flag): New function.
(OTF_open, OTF_open_ft_face): Check debug flag if not yet done.
(5) API miscellaneous
*/
+
+int debug_flag = -1;
+
+static void
+set_debug_flag ()
+{
+ debug_flag = getenv ("LIBOTF_DEBUG") != NULL;
+}
+
\f
/* (0) Stream handler
int len = strlen (otf_name);
const char *ext = otf_name + (len - 4);
+ if (debug_flag < 0)
+ set_debug_flag ();
+
if (len < 4
|| ext[0] != '.'
|| (ext[1] != 'O' && ext[1] != 'T' && ext[1] != 'o' && ext[1] != 't')
OTF *otf;
OTF_InternalData *internal_data;
+ if (debug_flag < 0)
+ set_debug_flag ();
+
if (! FT_IS_SFNT (face))
OTF_ERROR (OTF_ERROR_FILE, (char *) face->family_name);
otf = calloc (1, sizeof (OTF));