int slant, weight;
char *fullnames[MAX_FULLNAME];
char *families[MAX_FULLNAME];
+ char *postscript_name = NULL;
// we're only interested in outlines
if (!(face->face_flags & FT_FACE_FLAG_SCALABLE))
if (num_family == 0)
goto error;
+ postscript_name = FT_Get_Postscript_Name(face);
+ if (postscript_name != NULL)
+ postscript_name = strdup_trimmed(postscript_name);
+
// calculate sensible slant and weight from style attributes
slant = 110 * !!(face->style_flags & FT_STYLE_FLAG_ITALIC);
weight = 300 * !!(face->style_flags & FT_STYLE_FLAG_BOLD) + 400;
info->slant = slant;
info->weight = weight;
info->width = 100; // FIXME, should probably query the OS/2 table
- info->families = calloc(sizeof(char *), num_family);
+ info->postscript_name = postscript_name;
+ info->families = calloc(sizeof(char *), num_family);
if (info->families == NULL)
goto error;
free(info->families);
free(info->fullnames);
+ free(postscript_name);
return 1;
}
free(meta->families);
free(meta->fullnames);
+ free(meta->postscript_name);
}
/**