You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While (de)serializing a glif file's <outline> element, it is written if aGlyph.outline is Some(...) and not if it is None. The official(?) https://github.com/unified-font-object/ufoNormalizer/ will omit the element during "serialization" if it is empty. I think norad should do the same, but doing so makes the tests fail because no outline element is considered None and an empty one is Some(Outline { components: [], contours: [] }).
One way to handle this is to not de/serialize values if they are empty, assigning None instead if Some(empty_something).
Another option would be to treat some values with None and empty values as the same. This would need more thought because for some values, you need to distinguish between "no value set" and "empty value".
Yet another would be to not use Option in Glyph and test for emptiness when serializing.
The text was updated successfully, but these errors were encountered:
While (de)serializing a glif file's
<outline>
element, it is written if aGlyph.outline
isSome(...)
and not if it isNone
. The official(?) https://github.com/unified-font-object/ufoNormalizer/ will omit the element during "serialization" if it is empty. I think norad should do the same, but doing so makes the tests fail because no outline element is consideredNone
and an empty one isSome(Outline { components: [], contours: [] })
.One way to handle this is to not de/serialize values if they are empty, assigning
None
instead ifSome(empty_something)
.Another option would be to treat some values with
None
and empty values as the same. This would need more thought because for some values, you need to distinguish between "no value set" and "empty value".Yet another would be to not use
Option
inGlyph
and test for emptiness when serializing.The text was updated successfully, but these errors were encountered: