return &default_encoding;
}
-#ifndef HAVE_OTF
-static OTF_Tag
-OTF_tag (char *name)
-{
- unsigned char *p = (unsigned char *) name;
-
- if (! name)
- return (OTF_Tag) 0;
- return (OTF_Tag) ((p[0] << 24)
- | (! p[1] ? 0
- : ((p[1] << 16)
- | (! p[2] ? 0
- : (p[2] << 8) | p[3]))));
-}
-#endif /* not HAVE_OTF */
-
+#ifdef HAVE_OTF
static MPlist *otf_script_list;
static int
plist = mplist_find_by_value (otf_script_list, (void *) tag);
return (plist ? MPLIST_KEY (plist) : Mnil);
}
-
+#endif /* HAVE_OTF */
/* XLFD parser/generator */
M17N_OBJECT_UNREF (font_encoding_list);
font_encoding_list = NULL;
}
+#ifdef HAVE_OTF
if (otf_script_list)
{
M17N_OBJECT_UNREF (otf_script_list);
otf_script_list = NULL;
}
+#endif /* HAVE_OTF */
for (i = 0; i <= MFONT_REGISTRY; i++)
MLIST_FREE1 (&mfont__property_table[i], names);
free_font_capability (void *object)
{
MFontCapability *cap = object;
- int i;
if (cap->lang)
free (cap->lang);
#ifdef HAVE_OTF
if (cap->script)
- for (i = 0; i < MFONT_OTT_MAX; i++)
- {
- if (cap->features[i].str)
- free (cap->features[i].str);
- if (cap->features[i].tags)
- free (cap->features[i].tags);
- }
+ {
+ int i;
+ for (i = 0; i < MFONT_OTT_MAX; i++)
+ {
+ if (cap->features[i].str)
+ free (cap->features[i].str);
+ if (cap->features[i].tags)
+ free (cap->features[i].tags);
+ }
+ }
#endif /* HAVE_OTF */
free (cap);
}
{
MFontCapability *cap = msymbol_get (sym, M_font_capability);
char *str, *p, *endp;
- int i;
if (cap)
return cap;
#ifdef HAVE_OTF
if (str[0] == 'o' && str[1] == 't' && str[2] == 'f' && str[3] == '=')
{
+ int i;
+
str += 4;
for (i = 0, p = str; i < 4 && p < endp; i++, p++);
if (i < 4)