From: Grigori Goronzy Date: Fri, 12 Jun 2015 01:20:49 +0000 (+0200) Subject: fontselect: trim names of embedded fonts X-Git-Tag: 0.13.0~28^2~49 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a8a05b81cbb885088eeec720a188d8feb0109f4e;p=libass 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. --- 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++;