#ifdef HAVE_OTF
static OTF *invalid_otf = (OTF *) "";
+static OTF *get_otf (MFLTFont *font, FT_Face *ft_face);
#endif /* HAVE_OTF */
typedef struct
ft_rfont->ft_face = ft_face;
ft_rfont->face_encapsulated = 1;
- MDEBUG_DUMP (" [FONT-FT] encapsulating ", (char *) ft_face->family_name,);
+ MDEBUG_PRINT1 (" [FONT-FT] encapsulating %s", (char *) ft_face->family_name);
MSTRUCT_CALLOC (rfont, MERROR_FONT_FT);
rfont->id = ft_info->font.file;
free (rfont);
}
-static OTF *
-get_otf (MFLTFont *font, FT_Face *ft_face)
-{
- MRealizedFont *rfont = ((MFLTFontForRealized *) font)->rfont;
- MFontFT *ft_info = (MFontFT *) rfont->font;
- MRealizedFontFT *ft_rfont = rfont->info;
- OTF *otf = ft_info->otf;
-
- if (! otf)
- {
-#if (LIBOTF_MAJOR_VERSION > 0 || LIBOTF_MINOR_VERSION > 9 || LIBOTF_RELEASE_NUMBER > 4)
- otf = OTF_open_ft_face (ft_rfont->ft_face);
-#else
- otf = OTF_open (MSYMBOL_NAME (ft_info->font.file));
-#endif
- if (! otf || OTF_get_table (otf, "head") < 0)
- otf = invalid_otf;
- ft_info->otf = otf;
- }
- if (ft_face)
- *ft_face = ft_rfont->ft_face;
- return (otf == invalid_otf ? NULL : otf);
-}
-
static int
ft_check_otf (MFLTFont *font, MFLTOtfSpec *spec)
{
return 0;
}
return 1;
-#endif /* HAVE_OTF */
not_otf:
+#endif /* HAVE_OTF */
return ((! spec->features[0] || spec->features[0][0] == 0xFFFFFFFF)
&& (! spec->features[1] || spec->features[1][0] == 0xFFFFFFFF));
}
#ifdef HAVE_OTF
+static OTF *
+get_otf (MFLTFont *font, FT_Face *ft_face)
+{
+ MRealizedFont *rfont = ((MFLTFontForRealized *) font)->rfont;
+ MFontFT *ft_info = (MFontFT *) rfont->font;
+ MRealizedFontFT *ft_rfont = rfont->info;
+ OTF *otf = ft_info->otf;
+
+ if (! otf)
+ {
+#if (LIBOTF_MAJOR_VERSION > 0 || LIBOTF_MINOR_VERSION > 9 || LIBOTF_RELEASE_NUMBER > 4)
+ otf = OTF_open_ft_face (ft_rfont->ft_face);
+#else
+ otf = OTF_open (MSYMBOL_NAME (ft_info->font.file));
+#endif
+ if (! otf || OTF_get_table (otf, "head") < 0)
+ otf = invalid_otf;
+ ft_info->otf = otf;
+ }
+ if (ft_face)
+ *ft_face = ft_rfont->ft_face;
+ return (otf == invalid_otf ? NULL : otf);
+}
+
#define DEVICE_DELTA(table, size) \
(((size) >= (table).StartSize && (size) <= (table).EndSize) \
? (table).DeltaValue[(size) - (table).StartSize] << 6 \
MFLTGlyphString *out, MFLTGlyphAdjustment *adjustment)
{
int len = to - from;
- int i, j, gidx;
#ifdef HAVE_OTF
+ int i, j, gidx;
MGlyph *in_glyphs = (MGlyph *) (in->glyphs);
MGlyph *out_glyphs = out ? (MGlyph *) (out->glyphs) : NULL;
OTF *otf;