API to change UFOs in-place
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 61
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Currently, every write erases the complete UFO directory and writes a fresh copy from memory.
It would be nice to be able to "commit a changeset" to a UFO where you only change what you marked for change. Add a glyph, modify another, delete a third, and then only those 3 changes hit the disk:
1. Update contents.plist of the target layer with the addition and deletion and write it to disk,
2. Write the added and modified glyph file to disk,
3. Delete the third glyph file from disk.
I am imagining a `ChangeSetBuilder` where you could queue up these add/change/remove events. Maybe you wouldn't even need to read the entire UFO from disk but just apply the changes where needed? It could even have events for other things like lib, kerning, groups entries.
The primary use-case would be to avoid IO churn, accidentally changing the formatting of existing files (bleh) and maybe better supporting file watching tools?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the current UFO write path and how contents.plist and glyph files are handled. Define the changeset API and its supported add, modify, and remove operations; done means only affected files are updated while unrelated file contents remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100