return fontconfig_select_with_charset(priv, family, bold, italic, index, 0);
}
+#if (FC_VERSION < 20402)
static char* validate_fname(char* name)
{
char* fname;
*q = 0;
return fname;
}
+#endif
/**
* \brief Process memory font.
*/
static void process_fontdata(fc_instance_t* priv, ass_library_t* library, FT_Library ftlibrary, int idx)
{
- char buf[1000];
- FILE* fp = 0;
int rc;
- struct stat st;
- char* fname;
const char* name = library->fontdata[idx].name;
const char* data = library->fontdata[idx].data;
int data_size = library->fontdata[idx].size;
- const char* fonts_dir = library->fonts_dir;
- FT_Face face;
- FcPattern* pattern;
- FcFontSet* fset;
- FcBool res;
#if (FC_VERSION < 20402)
+ struct stat st;
+ char* fname;
+ const char* fonts_dir = library->fonts_dir;
+ char buf[1000];
+ FILE* fp = 0;
+
if (!fonts_dir)
return;
rc = stat(fonts_dir, &st);
fclose(fp);
#else // (FC_VERSION >= 20402)
+ FT_Face face;
+ FcPattern* pattern;
+ FcFontSet* fset;
+ FcBool res;
rc = FT_New_Memory_Face(ftlibrary, (unsigned char*)data, data_size, 0, &face);
if (rc) {
fc_instance_t* fontconfig_init(ass_library_t* library, FT_Library ftlibrary, const char* family, const char* path)
{
int rc;
- struct stat st;
fc_instance_t* priv = calloc(1, sizeof(fc_instance_t));
const char* dir = library->fonts_dir;
int i;