when norad parses the UFO layers, it reorders them such that the first one is always the default:
|
// move the default layer to the front |
|
let default_idx = layers |
|
.iter() |
|
.position(|l| l.path.to_str() == Some(DEFAULT_GLYPHS_DIRNAME)) |
|
.ok_or(FontLoadError::MissingDefaultLayer)?; |
|
layers.rotate_left(default_idx); |
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.
when norad parses the UFO layers, it reorders them such that the first one is always the default:
norad/src/layer.rs
Lines 88 to 93 in 0b9e433
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.