diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2014-01-11 20:49:05 +1030 |
---|---|---|
committer | Uli Schlachter <psychon@znc.in> | 2014-08-27 10:56:54 +0200 |
commit | 920247086c9ca1a8d801986ed93c0baa7985c35d (patch) | |
tree | a89e2e55630ad1f36d0ddeab1935db116a62c131 | |
parent | 15045aebebc07ad71477b44a700761d6e0340192 (diff) |
type1: strip space from end of font name
-rw-r--r-- | src/cairo-type1-subset.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c index ab108cb0f..3a1bcc751 100644 --- a/src/cairo-type1-subset.c +++ b/src/cairo-type1-subset.c @@ -420,6 +420,9 @@ cairo_type1_font_subset_get_fontname (cairo_type1_font_subset_t *font) if (end == NULL) return CAIRO_INT_STATUS_UNSUPPORTED; + while (end > start && _cairo_isspace(end[-1])) + end--; + s = malloc (end - start + 1); if (unlikely (s == NULL)) return _cairo_error (CAIRO_STATUS_NO_MEMORY); |