Ticket #1640: fcreq.diff

File fcreq.diff, 1.0 KB (added by reimar, 16 years ago)

Compile with older fontconfig

  • libass/ass_fontconfig.c

     
    284284 * \param ftlibrary freetype library object
    285285 * \param idx index of the processed font in library->fontdata
    286286 * With FontConfig >= 2.4.2, builds a font pattern in memory via FT_New_Memory_Face/FcFreeTypeQueryFace.
    287  * With older FontConfig versions, save the font to ~/.mplayer/fonts.
     287 * With older FontConfig versions just fail with an error.
    288288*/
    289289static void process_fontdata(FCInstance *priv, ASS_Library *library,
    290290                             FT_Library ftlibrary, int idx)
    291291{
     292#if FC_VERSION < 20402
     293    ass_msg(library, MSGL_WARN,
     294            "Cannot load font %s, fontconfig version is too old.\n",
     295            library->fontdata[idx].name);
     296#else
    292297    int rc;
    293298    const char *name = library->fontdata[idx].name;
    294299    const char *data = library->fontdata[idx].data;
     
    335340
    336341        FT_Done_Face(face);
    337342    }
     343#endif
    338344}
    339345
    340346/**