@liiift-studio/sanity-font-manager 2.3.2 → 2.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -110,6 +110,39 @@ Updates and re-links existing script font variant references on font documents
110
110
 
111
111
  Recalculates and patches the `subfamily` field on all fonts linked to a typeface, based on the typeface's defined subfamily groups — without re-uploading any files.
112
112
 
113
+ ### `SetOTF`
114
+
115
+ Detects which configured OpenType feature keys are supported by the typeface's first linked font. Reads `opentypeFeatures.chars` from the font document (populated by `generateFontData`) and patches the `features` array on the field. Shows a feature count when features are detected, and clear error messages when font data is missing.
116
+
117
+ Wire it up on the `openType` object field in the typeface schema:
118
+
119
+ ```jsx
120
+ import { SetOTF } from '@liiift-studio/sanity-font-manager';
121
+
122
+ {
123
+ name: 'openType',
124
+ type: 'object',
125
+ components: { input: SetOTF },
126
+ options: { collapsible: true },
127
+ fields: [ /* feature fields — each with a `feature` string e.g. 'liga', 'smcp' */ ],
128
+ }
129
+ ```
130
+
131
+ ### `StyleCountInput`
132
+
133
+ Displays the total number of font styles (static + variable) linked to a typeface. Reads `styles.fonts` and `styles.variableFont` arrays from the form context. Useful as a read-only display field in the typeface schema.
134
+
135
+ ```jsx
136
+ import { StyleCountInput } from '@liiift-studio/sanity-font-manager';
137
+
138
+ {
139
+ name: 'styleCount',
140
+ type: 'number',
141
+ readOnly: true,
142
+ components: { input: StyleCountInput },
143
+ }
144
+ ```
145
+
113
146
  ### `KeyValueInput`
114
147
 
115
148
  Generic ordered key-value editor where both keys and values are plain strings. Supports add, remove, and reorder (up/down arrows). Values are stored as an array of `{ key, value }` objects.