MCPcopy Index your code
hub / github.com/fontsource/fontsource / getFaceKey

Function getFaceKey

packages/core/src/processor.ts:221–233  ·  view source on GitHub ↗
(
		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[] = [];

Callers 1

buildFontFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected