behdad / glyphy

GLyphy is a signed-distance-field (SDF) text renderer using OpenGL ES2 shading language.
Other
663 stars 76 forks source link

Return the needed size for encoding #58

Closed matthiasclasen closed 1 year ago

matthiasclasen commented 1 year ago

When the buffer is too small, glyphy_arc_list_encode_blob2 returns false. In order for the caller to handle the failure, we need to return the size that would be needed, so set output_len even in the failure case.