Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

norad should not reorder layers #343

Open
anthrotype opened this issue Mar 11, 2024 · 0 comments
Open

norad should not reorder layers #343

anthrotype opened this issue Mar 11, 2024 · 0 comments

Comments

@anthrotype
Copy link
Collaborator

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

// 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.

@anthrotype anthrotype changed the title norad should not reolder layers norad should not reol]rder layers Mar 11, 2024
@anthrotype anthrotype changed the title norad should not reol]rder layers norad should not reorder layers Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants