Learn Performance - Fonts
Inline @font-face and external stylesheets
When inlining font-face declarations, if the page contains render-blocking resources—such as scripts or stylesheets—the browser will wait for all render-blocking files to finish downloading before it downloads the font files.
Inlining font-face declarations is mostly effective when the page does not contain any other render-blocking resources.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam ac orci dictum, dictum augue nec, semper sapien. Etiam efficitur a nisl sed semper. Nam et venenatis risus, eget consequat odio. Praesent at purus ligula. Pellentesque tincidunt lorem at augue mattis blandit. Cras at ipsum augue. Duis vestibulum, ex eu commodo tristique, sem dui cursus lorem, quis sollicitudin leo sem et dui. Integer nec pellentesque nisi. Aliquam fringilla quam neque, eget volutpat nisi pharetra ac. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
View Source Code
<style>
@font-face {
font-family: "Dancing Script";
src: url("/DancingScript-Regular.woff2?v=1676325285146");
}
.fancy {
font-family: "Dancing Script";
}
</style>
<link rel="stylesheet" href="../style.css">