fontParts icon indicating copy to clipboard operation
fontParts copied to clipboard

Add wrapper for DefCon font.data

Open thundernixon opened this issue 6 years ago • 2 comments

I'm hoping to store data that is specific to a font and its glyphs, but in the UFO data folder, so it can be independently version-controlled. This is explained more here: https://forum.robofont.com/topic/660/can-ufo-specific-extension-settings-be-stored-in-a-property-list-plist-file-in-the-ufo.

There, @typesupply commented:

You can access the data directory abstractly through the font.data attribute of the defcon font object. (Get to this with font.naked() This will return the DataSet object that you can put/pull raw data into/from. I don't think this is wrapped by fontParts yet. It's probably worth opening an issue on the fontParts project about this.

So, here's an issue to suggest adding this feature at some point.

thundernixon avatar Jul 01 '19 16:07 thundernixon

An API like this would work:

font.data[fileName] = blob
blob = font.data[fileName]

defcon has this implemented, it just needs to be wrapped by fontParts.

typesupply avatar Jul 01 '19 17:07 typesupply

Looking at this, we'll need to add data to the general font object, then wrap it in fontshell

benkiel avatar Jan 21 '22 15:01 benkiel