googlefonts / cu2qu

Cubic-to-quadratic bezier curve conversion
Apache License 2.0
64 stars 21 forks source link

cu2qu script doesn't convert sparse layers; take a designspace as input? #184

Open anthrotype opened 5 years ago

anthrotype commented 5 years ago

The cu2qu console script currently only accepts single UFOs and will convert their respective default layers to quadratic. It would be nice if the cu2qu script also accepted a Designspace document as input. This would allow the cu2qu script to also convert the non-default "sparse" layers (or "brace layers" using Glyphs.app's jargon) that may be referenced in the designspace sources (i.e. the additional sources that reference the same UFO filename as a default source but have a layer attribute to specify a non-default layer within the same UFO, used to provide additional masters for specific glyphs).

Note that fonts_to_quadratic function is already been used by ufo2ft to convert default and sparse layers compatibly when compiling interpolatable TTFs. Here I am talking about the cu2qu console script that converts UFOs from cubic to quadratic, which one can use if interested in obtaining a set of UFOs with quadratic curves (rather than just converting curves in memory while compiling TTFs which is already supported).