Skip to content
New issue

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

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

Already on GitHub? # to your account

crate::font::load_layers and LayerSet::load should agree whether layercontents.plist is required or not #223

Open
madig opened this issue Dec 28, 2021 · 1 comment

Comments

@madig
Copy link
Collaborator

madig commented Dec 28, 2021

norad/src/font.rs

Lines 640 to 642 in d4af02b

if meta.format_version == FormatVersion::V3 && !layercontents_path.exists() {
return Err(Error::MissingFile(layercontents_path.display().to_string()));
}

vs.

norad/src/layer.rs

Lines 45 to 50 in d4af02b

let to_load: Vec<(LayerName, PathBuf)> = if layer_contents_path.exists() {
plist::from_file(&layer_contents_path)
.map_err(|source| Error::PlistLoad { path: layer_contents_path, source })?
} else {
vec![(Arc::from(DEFAULT_LAYER_NAME), PathBuf::from(DEFAULT_GLYPHS_DIRNAME))]
};

considering LayerSet::load is public.

@madig
Copy link
Collaborator Author

madig commented Jan 11, 2022

It's not public anymore, so maybe this is less important currently.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant