From a8a05b81cbb885088eeec720a188d8feb0109f4e Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Fri, 12 Jun 2015 03:20:49 +0200 Subject: fontselect: trim names of embedded fonts Embedded fonts tend to be extra bad, so trim the names. I have encountered fonts faces with untrimmed names. Leave this at the discretion of the font provider for platform-specific font providers. --- libass/ass_fontselect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libass/ass_fontselect.c b/libass/ass_fontselect.c index 3fcd8c7..783f44c 100644 --- a/libass/ass_fontselect.c +++ b/libass/ass_fontselect.c @@ -645,14 +645,14 @@ get_font_info(FT_Library lib, FT_Face face, ASS_FontProviderMetaData *info) *bufptr = '\0'; if (name.name_id == 4) { - fullnames[num_fullname] = strdup(buf); + fullnames[num_fullname] = strdup_trimmed(buf); if (fullnames[num_fullname] == NULL) goto error; num_fullname++; } if (name.name_id == 1) { - families[num_family] = strdup(buf); + families[num_family] = strdup_trimmed(buf); if (families[num_family] == NULL) goto error; num_family++; -- cgit v1.2.3