Function
getFaceKey
(
face: Pick<
FontFace,
'subset' | 'weight' | 'style' | 'axisKey' | 'sliceIndex'
>,
)
Source from the content-addressed store, hash-verified
| 219 | |
| 220 | // Generate a unique key for each face based on its defining properties. |
| 221 | const getFaceKey = ( |
| 222 | face: Pick< |
| 223 | FontFace, |
| 224 | 'subset' | 'weight' | 'style' | 'axisKey' | 'sliceIndex' |
| 225 | >, |
| 226 | ) => |
| 227 | [ |
| 228 | face.subset, |
| 229 | face.weight, |
| 230 | face.style, |
| 231 | face.axisKey ?? '', |
| 232 | face.sliceIndex, |
| 233 | ].join('|'); |
| 234 | |
| 235 | // Export fonts for each axis combination and build corresponding CSS faces. |
| 236 | const fontAssets: FontAsset[] = []; |
Tested by
no test coverage detected