From 3f6461847412e78bcddc8eba97200f3afcde869a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 25 Jul 2014 12:04:27 -0400 Subject: [PATCH] Allow space at the end of feature string with values, eg 'dlig=1 ' --- src/hb-shape.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hb-shape.cc b/src/hb-shape.cc index 94c6f7287..2ed6ce979 100644 --- a/src/hb-shape.cc +++ b/src/hb-shape.cc @@ -34,12 +34,13 @@ #include "hb-font-private.hh" -static void +static bool parse_space (const char **pp, const char *end) { char c; while (*pp < end && (c = **pp, ISSPACE (c))) (*pp)++; + return true; } static bool @@ -174,6 +175,7 @@ parse_one_feature (const char **pp, const char *end, hb_feature_t *feature) parse_feature_tag (pp, end, feature) && parse_feature_indices (pp, end, feature) && parse_feature_value_postfix (pp, end, feature) && + parse_space (pp, end) && *pp == end; }