You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notes from Just:
Regarding the writable glyphs backend:
it is in the fontra-glyphs repo (I assume you know that)
It currently implements the ReadableFontBackend protocol (defined in protocols.py)
It needs to implement all methods of WritableFontBackend (same module)
Start with stubs that do nothing
Then start sketching out putGlyph()
Have a look at _loadFiles, it reads the raw data. We mostly throw that away after parsing, but we should probably hold on to it so we can update it and write it back.
Compare with the fontra backend and the designspace backend, see how they implement writing glyphs.
So, loading .glyphs data goes in two steps:
parse file with openstep_plist.load() , this results in "raw" data structures
construct objects from the raw data structures into proper objects, lazily / on demand
For writing, we should keep the raw data around, and "patch" it up with our modified data, then write with openstep_plist.dump() (I think that's what it's called)
This strategy should give us minimal changes compared to the original data (this is an important goal).
The text was updated successfully, but these errors were encountered:
See also: googlefonts/fontra#117
Notes from Just:
Regarding the writable glyphs backend:
ReadableFontBackend
protocol (defined in protocols.py)WritableFontBackend
(same module)putGlyph()
_loadFiles
, it reads the raw data. We mostly throw that away after parsing, but we should probably hold on to it so we can update it and write it back.Compare with the fontra backend and the designspace backend, see how they implement writing glyphs.
So, loading .glyphs data goes in two steps:
openstep_plist.load()
, this results in "raw" data structuresFor writing, we should keep the raw data around, and "patch" it up with our modified data, then write with
openstep_plist.dump()
(I think that's what it's called)This strategy should give us minimal changes compared to the original data (this is an important goal).
The text was updated successfully, but these errors were encountered: