Home / Function/ astroToUnifontProvider() — astro Function Reference

astroToUnifontProvider() — astro Function Reference

Architecture documentation for the astroToUnifontProvider() function in unifont-font-resolver.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  585ad958_97bd_0d25_1b2b_d396c4fe2747["astroToUnifontProvider()"]
  e75025f8_1303_03ea_42ce_653194e50374["UnifontFontResolver"]
  585ad958_97bd_0d25_1b2b_d396c4fe2747 -->|defined in| e75025f8_1303_03ea_42ce_653194e50374
  9f4d1ee9_7723_97a0_a304_0a2525104e5b["extractUnifontProviders()"]
  9f4d1ee9_7723_97a0_a304_0a2525104e5b -->|calls| 585ad958_97bd_0d25_1b2b_d396c4fe2747
  40582598_ddaf_bc56_1d35_6346d14bd03c["resolveFont()"]
  585ad958_97bd_0d25_1b2b_d396c4fe2747 -->|calls| 40582598_ddaf_bc56_1d35_6346d14bd03c
  45f5b03a_8e0e_9fc6_197c_a482452c81b0["listFonts()"]
  585ad958_97bd_0d25_1b2b_d396c4fe2747 -->|calls| 45f5b03a_8e0e_9fc6_197c_a482452c81b0
  style 585ad958_97bd_0d25_1b2b_d396c4fe2747 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/assets/fonts/infra/unifont-font-resolver.ts lines 31–43

	static astroToUnifontProvider(astroProvider: FontProvider, root: URL): Provider {
		return defineFontProvider(astroProvider.name, async (_options: any, ctx) => {
			await astroProvider?.init?.({ ...ctx, root });
			return {
				async resolveFont(familyName, { options, ...rest }) {
					return await astroProvider.resolveFont({ familyName, options, ...rest });
				},
				async listFonts() {
					return astroProvider.listFonts?.();
				},
			};
		})(astroProvider.config);
	}

Domain

Subdomains

Frequently Asked Questions

What does astroToUnifontProvider() do?
astroToUnifontProvider() is a function in the astro codebase, defined in packages/astro/src/assets/fonts/infra/unifont-font-resolver.ts.
Where is astroToUnifontProvider() defined?
astroToUnifontProvider() is defined in packages/astro/src/assets/fonts/infra/unifont-font-resolver.ts at line 31.
What does astroToUnifontProvider() call?
astroToUnifontProvider() calls 2 function(s): listFonts, resolveFont.
What calls astroToUnifontProvider()?
astroToUnifontProvider() is called by 1 function(s): extractUnifontProviders.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free