MCPcopy Create free account
hub / github.com/fontsource/fontsource / getDownloadPath

Function getDownloadPath

packages/cli/src/google/download.ts:128–153  ·  view source on GitHub ↗
(
	id: string,
	variant: Variant,
	opts: BuildOptions,
)

Source from the content-addressed store, hash-verified

126}
127
128const getDownloadPath = (
129 id: string,
130 variant: Variant,
131 opts: BuildOptions,
132): string => {
133 if (variant.kind === 'static') {
134 return makeFontDownloadPath(
135 opts.dir,
136 id,
137 variant.subset,
138 variant.weight,
139 variant.style,
140 variant.extension,
141 );
142 }
143 if (variant.kind === 'variable') {
144 return makeVariableFontDownloadPath(
145 opts.dir,
146 id,
147 variant.subset,
148 variant.axes,
149 variant.style,
150 );
151 }
152 return assertNever(variant);
153};
154
155const variantsToLinks = (
156 id: string,

Callers 1

variantsToLinksFunction · 0.85

Calls 3

makeFontDownloadPathFunction · 0.90
assertNeverFunction · 0.90

Tested by

no test coverage detected