linebender / norad

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

[designspace] Stop generating source/instance names #313

Closed cmyr closed 1 year ago

cmyr commented 1 year ago

closes #312

Hoolean commented 1 year ago

Thanks for putting this PR together Colin, you beat me to it! Nice to see that only minimal changes are needed in fontc too :+1:

RickyDaMa commented 1 year ago

Looks good to me, if this gets merged I'll rebase my PR over it :)

anthrotype commented 1 year ago

Nice to see that only minimal changes are needed in fontc too

fontc relies on those name attributes being set to non Optional values (e.g. it uses the source.name as a unique way to identify specific source elements, for the filename may well be the same for multiple sources referencing different layers from the same .ufo), so this is a breaking change.. If norad is unwilling to provide these unique name attributes fontc will have to do the same dance with AtomicU64. It's not sufficient to fallback to a constant "placeholder_source_name" because that might well clash.

cmyr commented 1 year ago

I have a patch for fontc written, and I do think that this belongs there, instead of norad.