summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@chown.ath.cx>2015-06-12 03:20:49 +0200
committerGrigori Goronzy <greg@chown.ath.cx>2015-07-10 10:43:16 +0200
commita8a05b81cbb885088eeec720a188d8feb0109f4e (patch)
tree665441b6f5fa4bcd63c2072068a14e4adc060f15
parent2272875210b9abc3255bedce9301231e8e8c4865 (diff)
downloadlibass-a8a05b81cbb885088eeec720a188d8feb0109f4e.tar.bz2
libass-a8a05b81cbb885088eeec720a188d8feb0109f4e.tar.xz
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.
-rw-r--r--libass/ass_fontselect.c4
1 files 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++;