Fix or document unsupported font-feature-settings
This commit is contained in:
parent
d66f7e14a0
commit
45adc18526
|
@ -731,7 +731,7 @@ parse_uint (const char **pp, const char *end, unsigned int *pv)
|
||||||
/* Intentionally use strtol instead of strtoul, such that
|
/* Intentionally use strtol instead of strtoul, such that
|
||||||
* -1 turns into "big number"... */
|
* -1 turns into "big number"... */
|
||||||
errno = 0;
|
errno = 0;
|
||||||
v = strtol (p, &pend, 0);
|
v = strtol (p, &pend, 10);
|
||||||
if (errno || p == pend)
|
if (errno || p == pend)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -755,7 +755,7 @@ parse_uint32 (const char **pp, const char *end, uint32_t *pv)
|
||||||
/* Intentionally use strtol instead of strtoul, such that
|
/* Intentionally use strtol instead of strtoul, such that
|
||||||
* -1 turns into "big number"... */
|
* -1 turns into "big number"... */
|
||||||
errno = 0;
|
errno = 0;
|
||||||
v = strtol (p, &pend, 0);
|
v = strtol (p, &pend, 10);
|
||||||
if (errno || p == pend)
|
if (errno || p == pend)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -857,9 +857,14 @@ parse_bool (const char **pp, const char *end, uint32_t *pv)
|
||||||
(*pp)++;
|
(*pp)++;
|
||||||
|
|
||||||
/* CSS allows on/off as aliases 1/0. */
|
/* CSS allows on/off as aliases 1/0. */
|
||||||
if (*pp - p == 2 && 0 == strncmp (p, "on", 2))
|
if (*pp - p == 2
|
||||||
|
&& TOLOWER (p[0]) == 'o'
|
||||||
|
&& TOLOWER (p[1]) == 'n')
|
||||||
*pv = 1;
|
*pv = 1;
|
||||||
else if (*pp - p == 3 && 0 == strncmp (p, "off", 3))
|
else if (*pp - p == 3
|
||||||
|
&& TOLOWER (p[0]) == 'o'
|
||||||
|
&& TOLOWER (p[1]) == 'f'
|
||||||
|
&& TOLOWER (p[2]) == 'f')
|
||||||
*pv = 0;
|
*pv = 0;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
@ -975,8 +980,9 @@ parse_one_feature (const char **pp, const char *end, hb_feature_t *feature)
|
||||||
* Parses a string into a #hb_feature_t.
|
* Parses a string into a #hb_feature_t.
|
||||||
*
|
*
|
||||||
* The format for specifying feature strings follows. All valid CSS
|
* The format for specifying feature strings follows. All valid CSS
|
||||||
* font-feature-settings values other than 'normal' and 'inherited' are also
|
* font-feature-settings values other than 'normal' and the global values are
|
||||||
* accepted, though, not documented below.
|
* also accepted, though not documented below. CSS string escapes are not
|
||||||
|
* supported.
|
||||||
*
|
*
|
||||||
* The range indices refer to the positions between Unicode characters. The
|
* The range indices refer to the positions between Unicode characters. The
|
||||||
* position before the first character is always 0.
|
* position before the first character is always 0.
|
||||||
|
|
|
@ -432,7 +432,8 @@ shape_options_t::add_options (option_parser_t *parser)
|
||||||
" Features can be enabled or disabled, either globally or limited to\n"
|
" Features can be enabled or disabled, either globally or limited to\n"
|
||||||
" specific character ranges. The format for specifying feature settings\n"
|
" specific character ranges. The format for specifying feature settings\n"
|
||||||
" follows. All valid CSS font-feature-settings values other than 'normal'\n"
|
" follows. All valid CSS font-feature-settings values other than 'normal'\n"
|
||||||
" and 'inherited' are also accepted, though, not documented below.\n"
|
" and the global values are also accepted, though not documented below.\n"
|
||||||
|
" CSS string escapes are not supported."
|
||||||
"\n"
|
"\n"
|
||||||
" The range indices refer to the positions between Unicode characters,\n"
|
" The range indices refer to the positions between Unicode characters,\n"
|
||||||
" unless the --utf8-clusters is provided, in which case range indices\n"
|
" unless the --utf8-clusters is provided, in which case range indices\n"
|
||||||
|
|
Loading…
Reference in New Issue