Skip to content

Commit

Permalink
Add object lib documentation as discussed in #115.
Browse files Browse the repository at this point in the history
  • Loading branch information
typesupply committed Aug 16, 2020
1 parent d163382 commit c27c6d3
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
25 changes: 25 additions & 0 deletions versions/ufo3/glyphs/glif.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,31 @@ than 128 characters. Otherwise, a SHA 512 hash is computed, and this is used as
the Hint ID for the hint dict. The SHA 512 hash is written with lowercase
hexidecimal digits.

##### public.objectLibs

This key provides a dictionary of data containing object-level lib data for individual contours, points, components, anchors or guidelines within the glyph that this lib belongs to. The dictionary is structured with object identifiers that correspond to objects in the glyph as keys and object-level dictionaries as values. Within each of these of these object-level dictionaries, keys should follow a [reverse domain naming scheme]. The pattern "public.\*", where `*` represents an arbitrary string of one or more characters, is reserved for use in standardized lib keys. It is recommended that the data stored as a value be as shallow as possible. If a key in this dictionary is not an identifier of any object within this glyph, the key and value may be discarded.

```xml
<key>public.objectIdentifiers</key>
<dict>
<key>vMlVuTQd4d</key>
<dict>
<key>com.foundry.contourColor</key>
<string>1,0,0,0.5</string>
</dict>
<key>KN3WZjorob</key>
<dict>
<key>com.foundry.pointColor</key>
<string>0,1,0,0.5</string>
</dict>
<key>h0ablXAzTg</key>
<dict>
<key>com.foundry.pointColor</key>
<string>1,0,0,0.5</string>
</dict>
</dict>
```

### Example

```xml
Expand Down
25 changes: 25 additions & 0 deletions versions/ufo3/lib.plist.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,31 @@ The handling of the feature file is undefined.

This data is optional. Glyph names must not occur more than once. The list may contain glyphs that are not in the font. An empty list or the absence of this key means that all glyphs are to be exported as-is with groups and kerning untouched.

#### public.objectLibs

This key provides a dictionary of data containing object-level lib data for individual guidelines within fontinfo.plist. The dictionary is structured with object identifiers that correspond to guidelines as keys and object-level dictionaries as values. Within each of these of these object-level dictionaries, keys should follow a [reverse domain naming scheme]. The pattern "public.\*", where `*` represents an arbitrary string of one or more characters, is reserved for use in standardized lib keys. It is recommended that the data stored as a value be as shallow as possible. If a key in this dictionary is not an identifier of any guideline within fontinfo.plist, the key and value may be discarded.

```xml
<key>com.sometool.smartGuides</key>
<dict>
<key>7pdbofkUhz</key>
<dict>
<key>unicodeCategory</key>
<string>Lu</string>
</dict>
<key>z1bkCMlhNb</key>
<dict>
<key>contourCount</key>
<array>
<string>&gt;</string>
<integer>0</integer>
</array>
<key>glyphNamePattern</key>
<string>*.sc*</string>
</dict>
</dict>
```

### Example

```xml
Expand Down

0 comments on commit c27c6d3

Please sign in to comment.