mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-24 16:31:14 +01:00
Simplify JSON unicode serialization
It’s just an array of codepoints; no need to turn them into objects
This commit is contained in:
1 parent
57a528ab2c
commit
bb7b634cd0
1 file changed
-5
@@ -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)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user