Simplify JSON unicode serialization

It’s just an array of codepoints; no need to turn them into objects
This commit is contained in:
Simon Cozens authored and Behdad Esfahbod committed 2020-10-09 22:27:55 -06:00
1 parent 57a528ab2c
commit bb7b634cd0
1 file changed
-5
-5
View File
@@ -214,13 +214,8 @@ _hb_buffer_serialize_unicode_json (hb_buffer_t *buffer,
if (i)
*p++ = ',';
*p++ = '{';
APPEND ("\"u\":");
p += hb_max (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "%u", info[i].codepoint));
*p++ = '}';
unsigned int l = p - b;
if (buf_size > l)
{