Serializes buffer into a textual representation of its content, when the buffer contains Unicode codepoints (i.
e., before shaping). This is useful for showing the contents of the buffer, for example during debugging. There are currently two supported serialization formats:
A human-readable, plain text format. The serialized codepoints will look something like:
<U+0651=0|U+0628=1> - Glyphs are separated with `|` - Unicode codepoints are
expressed as zero-padded four (or more) digit hexadecimal numbers preceded by `U+` - If
NO_CLUSTERS is not set, the cluster will be indicated with
a `=` then cluster.
A machine-readable, structured format. The serialized codepoints will be a list of objects with the following properties: - `u`: the Unicode codepoint as a decimal integer - `cl`: cluster if NO_CLUSTERS is not set.
For example:
[{u:1617,cl:0},{u:1576,cl:1}]
| start |
the first item in |
| end |
the last item in |
| buf |
output string to write serialized buffer into. |
| buf_consumed |
if not `NULL`, will be set to the number of bytes written into |
| format |
the BufferSerializeFormat to use for formatting the output. |
| flags |
the BufferSerializeFlags that control what glyph properties to serialize. |
| buf_size |
the size of |
| buffer |
an Buffer buffer. |
|
The number of serialized items. |