linebender / norad

Rust crate for working with Unified Font Object files
Apache License 2.0
44 stars 12 forks source link

norad should not reorder layers #343

Open anthrotype opened 4 months ago

anthrotype commented 4 months ago

when norad parses the UFO layers, it reorders them such that the first one is always the default:

https://github.com/linebender/norad/blob/0b9e43334551861dbdd75732785d0cb5f3431568/src/layer.rs#L88-L93

However this is incorrect or unwarranted, because the UFO spec never says the default layer should be the first. Font editors may rely on the specific ordering of layers in layercontents.plist (which is deliberately typed as an array and not a dict) for various purposes.