Function

HarfBuzz-0.0HarfBuzzbuffer_serialize_unicodeSince 2.7.3

  • 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 #HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS is not set, the cluster will be indicated with a = then HarfBuzz.glyph_info_t.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: HarfBuzz.glyph_info_t.cluster if #HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS is not set.

    For example:

    [{u:1617,cl:0},{u:1576,cl:1}]
    

    Parameters

    Returns [number, Uint8Array<ArrayBufferLike>, number]

    The number of serialized items.

    2.7.3