Home / Function/ google() — astro Function Reference

google() — astro Function Reference

Architecture documentation for the google() function in index.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  78fb8250_bbfc_c437_6f4c_445328944549["google()"]
  b2a950f3_8ca8_375e_0c71_a3eaca706b9a["index.ts"]
  78fb8250_bbfc_c437_6f4c_445328944549 -->|defined in| b2a950f3_8ca8_375e_0c71_a3eaca706b9a
  style 78fb8250_bbfc_c437_6f4c_445328944549 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/assets/fonts/providers/index.ts lines 86–101

function google(): FontProvider<GoogleFamilyOptions | undefined> {
	const provider = providers.google();
	let initializedProvider: InitializedProvider<GoogleFamilyOptions> | undefined;
	return {
		name: provider._name,
		async init(context) {
			initializedProvider = await provider(context);
		},
		async resolveFont({ familyName, ...rest }) {
			return await initializedProvider?.resolveFont(familyName, rest);
		},
		async listFonts() {
			return await initializedProvider?.listFonts?.();
		},
	};
}

Domain

Subdomains

Frequently Asked Questions

What does google() do?
google() is a function in the astro codebase, defined in packages/astro/src/assets/fonts/providers/index.ts.
Where is google() defined?
google() is defined in packages/astro/src/assets/fonts/providers/index.ts at line 86.

Analyze Your Own Codebase

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

Try Supermodel Free