[util] Accept space as delimiter for --features/--variations
Fixes https://github.com/harfbuzz/harfbuzz/issues/3715
This commit is contained in:
parent
378663409a
commit
1eb8e82086
|
@ -173,7 +173,7 @@ parse_variations (const char *name G_GNUC_UNUSED,
|
|||
p = s;
|
||||
do {
|
||||
font_opts->num_variations++;
|
||||
p = strchr (p, ',');
|
||||
p = strpbrk (p, ", ");
|
||||
if (p)
|
||||
p++;
|
||||
} while (p);
|
||||
|
@ -186,7 +186,7 @@ parse_variations (const char *name G_GNUC_UNUSED,
|
|||
p = s;
|
||||
font_opts->num_variations = 0;
|
||||
while (p && *p) {
|
||||
char *end = strchr (p, ',');
|
||||
char *end = strpbrk (p, ", ");
|
||||
if (hb_variation_from_string (p, end ? end - p : -1, &font_opts->variations[font_opts->num_variations]))
|
||||
font_opts->num_variations++;
|
||||
p = end ? end + 1 : nullptr;
|
||||
|
|
|
@ -218,7 +218,7 @@ parse_features (const char *name G_GNUC_UNUSED,
|
|||
p = s;
|
||||
do {
|
||||
shape_opts->num_features++;
|
||||
p = strchr (p, ',');
|
||||
p = strpbrk (p, ", ");
|
||||
if (p)
|
||||
p++;
|
||||
} while (p);
|
||||
|
@ -231,7 +231,7 @@ parse_features (const char *name G_GNUC_UNUSED,
|
|||
p = s;
|
||||
shape_opts->num_features = 0;
|
||||
while (p && *p) {
|
||||
char *end = strchr (p, ',');
|
||||
char *end = strpbrk (p, ", ");
|
||||
if (hb_feature_from_string (p, end ? end - p : -1, &shape_opts->features[shape_opts->num_features]))
|
||||
shape_opts->num_features++;
|
||||
p = end ? end + 1 : nullptr;
|
||||
|
|
Loading…
Reference in New Issue