Home / Function/ renderFontFace() — astro Function Reference

renderFontFace() — astro Function Reference

Architecture documentation for the renderFontFace() function in minifiable-css-renderer.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  9479a2d2_6804_b69a_8c88_5e4a444a6c0d["renderFontFace()"]
  4df2df7e_7b50_0a76_f17c_a22a7c396706["minifiable-css-renderer.ts"]
  9479a2d2_6804_b69a_8c88_5e4a444a6c0d -->|defined in| 4df2df7e_7b50_0a76_f17c_a22a7c396706
  2992d8bc_170f_b58b_d651_6fc0de9839ab["generateFontFace()"]
  2992d8bc_170f_b58b_d651_6fc0de9839ab -->|calls| 9479a2d2_6804_b69a_8c88_5e4a444a6c0d
  style 9479a2d2_6804_b69a_8c88_5e4a444a6c0d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/assets/fonts/infra/minifiable-css-renderer.ts lines 6–16

export function renderFontFace(properties: CssProperties, minify: boolean): string {
	// Line feed
	const lf = minify ? '' : `\n`;
	// Space
	const sp = minify ? '' : ' ';

	return `@font-face${sp}{${lf}${Object.entries(properties)
		.filter(([, value]) => Boolean(value))
		.map(([key, value]) => `${sp}${sp}${key}:${sp}${value};`)
		.join(lf)}${lf}}${lf}`;
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does renderFontFace() do?
renderFontFace() is a function in the astro codebase, defined in packages/astro/src/assets/fonts/infra/minifiable-css-renderer.ts.
Where is renderFontFace() defined?
renderFontFace() is defined in packages/astro/src/assets/fonts/infra/minifiable-css-renderer.ts at line 6.
What calls renderFontFace()?
renderFontFace() is called by 1 function(s): generateFontFace.

Analyze Your Own Codebase

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

Try Supermodel Free