3 Commits

Author SHA1 Message Date
Nikolaus Waxweiler
d53583932a Order exceptions hierarchically 2020-02-07 11:39:37 +00:00
Cosimo Lupo
e07d582755
minor: prettify indentation of incompatible segments message 2018-01-18 16:53:47 +00:00
Cosimo Lupo
b627a778bf
Don't stop at first incompatibilty, log errors, raise at the end
Based on Miguel Sousa's original PR and the following discussion:
https://github.com/googlei18n/cu2qu/pull/114

Instead of raising an error at the first incompatible glyph, we
let it continue (keeping the original contours unmodified when
that happens), and use logging to print error messages.

A new `IncompatibleFontsError` exception is raised at the end of
`fonts_to_quadratic` if any glyph has incompatible number or types
of segments. The exception instance has a `glyph_errors` attribute
(dict) which collects all the individual IncompatibleGlyphsError
keyed by glyph name.
2018-01-18 13:21:08 +00:00