FMT
u32: unsigned integer on four bytes in big-endian order
f32: IEEE 754 number on four bytes in big endian order
step_type:
0 = arc
1 = cubic bezier curve
2 = quadratic bezier curve
3 = linear bezier curve (straight line)
u32 magic
---- virtual machine part below ----
u32 # of arguments
arguments:
u32 string_section_offset
f32 x_default_value
f32 y_default_value
f32 x_range_min
f32 x_range_max
f32 y_range_min
f32 y_range_max
u32 # of instructions
instructions:
u32 operation
u32 op1_addr
u32 op2_addr
u32 op3_addr
u32 # of outputs
outputs:
u32 string_section_offset
u32 addr
---- rendering part below ----
u32 # of triangles
triangles:
u32 p1_addr
u32 p2_addr
u32 p3_addr
u32 p1_rg_addr
u32 p1_ba_addr
u32 p2_rg_addr
u32 p2_ba_addr
u32 p3_rg_addr
u32 p3_ba_addr
u32 # of arcs
arcs:
u32 start_point_addr
u32 center_addr
u32 deltas_addr
u32 # of cubic bezier curves
bezier curves:
u32 p1_addr
u32 p2_addr
u32 p3_addr
u32 p4_addr
u32 # of quadratic bezier curves
quadratic curves:
u32 p1_addr
u32 p2_addr
u32 p3_addr
u32 # of lines
lines:
u32 p1_addr
u32 p2_addr
u32 # of strokers
strokers:
u32 pattern_addr (p.x = dash length, p.y = gap length)
u32 width_addr (width = p.x + p.y)
u32 rg_addr
u32 ba_addr
u32 # of steps
steps:
u32 step_type
u32 index
u32 # of paths
paths:
u32 first_step
u32 length
u32 # of triangle_indexes
triangle_indexes:
u32 triangle
u32 # of backgrounds
backgrounds:
u32 first_triangle
u32 length
u32 # of rendering steps
rendering steps:
u32 clip_or_stroke (0 or 1)
u32 path_index
if clip_or_stroke == 0:
u32 background_index
if clip_or_stroke == 1:
u32 stroker_index
---- strings below ----
u32 # of string bytes
string bytes:
u8 utf8_byte or null_byte