Skip to main content

Module text

Module text 

Source
Expand description

Text layers: TextLayerString (UTF-8) and its attributes.

TextLayerAttributes is a little-endian list of records u32 id, u32 length, bytes (spec: docs/spec/06-text.md). A layer with several text blocks (balloons) keeps them in TextLayerStringArray / TextLayerAttributesArray: u32le length + string / attribute list per block. Records whose ids this module does not decode are kept as bytes, so the attributes are written back unchanged.

Modules§

ids
Record ids whose meaning is known (see the spec for the confidence of each).

Structs§

Attributes
A parsed attribute list.
Font
Font name pair of record 57.
Record
One attribute record.
TextBlock
One text block of a text layer.

Functions§

join_array
Joins parts into a …Array column (the inverse of split_array).
read_blocks
The text blocks of a layer: the single string and attributes first, then one block per entry of the arrays. The arrays hold the other blocks, not a copy of the first: in the corpus the single block always has its own bounding box and rendered image (V7).
split_array
Split a …Array column: u32le length + bytes, repeated.