From 656c69d6a8a1e6a82cfdd599c657f8fc2717af8d Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 26 Jun 2003 08:19:11 +0000 Subject: Add autoconf checks for FT_Has_PS_Glyph_Names --- configure.in | 3 ++- src/fcfreetype.c | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 20b9dce..491cdf1 100644 --- a/configure.in +++ b/configure.in @@ -117,11 +117,12 @@ AC_SUBST(FREETYPE_CFLAGS) # FT_Get_Next_Char # FT_Get_BDF_Property # FT_Get_PS_Font_Info +# FT_Has_PS_Glyph_Names # fontconfig_save_libs=$LIBS LIBS="$LIBS $FREETYPE_LIBS" -AC_CHECK_FUNCS(FT_Get_Next_Char FT_Get_BDF_Property FT_Get_PS_Font_Info) +AC_CHECK_FUNCS(FT_Get_Next_Char FT_Get_BDF_Property FT_Get_PS_Font_Info FT_Has_PS_Glyph_Names) LIBS=$fontconfig_save_libs # diff --git a/src/fcfreetype.c b/src/fcfreetype.c index 60e0676..c2d00a9 100644 --- a/src/fcfreetype.c +++ b/src/fcfreetype.c @@ -1599,6 +1599,7 @@ FcHashGlyphName (const FcChar8 *name) return h; } +#if HAVE_FT_HAS_PS_GLYPH_NAMES /* * Use Type1 glyph names for fonts which have reliable names * and which export an Adobe Custom mapping @@ -1684,6 +1685,7 @@ FcFreeTypeGlyphNameIndex (FT_Face face, FcChar8 *name) } return 0; } +#endif /* * Map a UCS4 glyph to a glyph index. Use all available encoding @@ -1731,6 +1733,7 @@ FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4) if (glyphindex) return glyphindex; } +#if HAVE_FT_HAS_PS_GLYPH_NAMES /* * Check postscript name table if present */ @@ -1744,6 +1747,7 @@ FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4) return glyphindex; } } +#endif return 0; } @@ -1933,6 +1937,7 @@ FcFreeTypeCharSetAndSpacing (FT_Face face, FcBlanks *blanks, int *spacing) #endif } } +#if HAVE_FT_HAS_PS_GLYPH_NAMES /* * Add mapping from PS glyph names if available */ @@ -1967,6 +1972,7 @@ FcFreeTypeCharSetAndSpacing (FT_Face face, FcBlanks *blanks, int *spacing) } } } +#endif #ifdef CHECK printf ("%d glyphs %d encoded\n", (int) face->num_glyphs, FcCharSetCount (fcs)); for (ucs4 = 0; ucs4 <= font_max; ucs4++) -- cgit v1.2.3