This would solve the following (non-issue) problems:
For the variable-length array flags in glyf table simple descriptions, the condition to stop repeating is "sum over a given projected field of the record being repeated == final element of end_points_of_contours array". This is currently inefficient to define given our existing vocabulary, as while we have Expr::LeftFold and Format::RepeatUntilSeq, we have no way of preserving the sum over the first N elements to add the N+1 repetition to to avoid quadratic cost for a linear computation.
This is useful for capturing the we_have_instructions flag within the loop over composite glyph components, and could even allow us to use a single primitive for both this issue, and simple glyph termination predicates in O(N) time.
This would solve the following (non-issue) problems:
flags
in glyf table simple descriptions, the condition to stop repeating is "sum over a given projected field of the record being repeated == final element of end_points_of_contours array". This is currently inefficient to define given our existing vocabulary, as while we have Expr::LeftFold and Format::RepeatUntilSeq, we have no way of preserving the sum over the first N elements to add the N+1 repetition to to avoid quadratic cost for a linear computation.we_have_instructions
flag within the loop over composite glyph components, and could even allow us to use a single primitive for both this issue, and simple glyph termination predicates inO(N)
time.