From 6187824632f512334b697c3efe0d37cb2f74b4f6 Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Fri, 18 Sep 2020 09:49:19 +0100 Subject: [PATCH] Simplify JSON unicode serialization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s just an array of codepoints; no need to turn them into objects --- src/hb-buffer-serialize.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/hb-buffer-serialize.cc b/src/hb-buffer-serialize.cc index f9522d374..d20dcefdf 100644 --- a/src/hb-buffer-serialize.cc +++ b/src/hb-buffer-serialize.cc @@ -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) {