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

Function createFontContext

packages/core/src/context.ts:19–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17 * @returns A FontContext object.
18 */
19export const createFontContext = (): FontContext => {
20 const glyphtContext = new GlyphtContext();
21 const compressionContext = new WoffCompressionContext();
22
23 return {
24 glyphtContext,
25 compressionContext,
26 destroy: () => {
27 glyphtContext.destroy();
28 compressionContext.destroy();
29 },
30 };
31};

Callers 3

buildWithFixtureFunction · 0.90
conversion.test.tsFile · 0.90
useFontConverterFunction · 0.90

Calls 1

destroyMethod · 0.80

Tested by 1

buildWithFixtureFunction · 0.72