Aabestfontgenerator.
THE TYPE NOTEBOOK

Webfont Kits and Their Stylesheets

Understand what a webfont kit includes, follow the stylesheet’s relative paths and record the files needed when handing a website over.

A self-hosted webfont kit usually brings the font files and example stylesheet together. Keep the files in the expected structure when you move the kit into a project.

Sources reviewed .

01

Read the package before moving its files

Fontspring’s kit instructions describe uploading the package files and linking the supplied stylesheet. Identify each font file, its declared weight or style and the stylesheet that refers to it. Keep any license notice from the kit with the project record. Select the supplied formats appropriate to your project and browser requirements.

02

Follow the path from the stylesheet

If the CSS file is at /assets/css/kit.css and uses ../fonts/regular.woff2, the browser requests /assets/fonts/regular.woff2. Moving the CSS file can change where that relative path points. Compare the original directory layout with the deployed layout, and check what the build system copies to the public output.

03

Hand off a minimal page alongside the file list

Use one short example with a regular and italic or bold line. List the family name, stylesheet location and files each style requires. Check the rendered family and the actual font requests. Follow the CSS font-face guide when writing declarations from scratch. For a caption that is only meant to be copied as styled text, use the homepage text generator separately.

GOOD QUESTIONS

Your questions, answered.

Can I move only the stylesheet to a new directory?

Yes if you also keep its font URLs pointing to the correct files. Relative URLs start from the stylesheet’s location.

Does uploading the font files apply them automatically?

Load the stylesheet and apply the declared family name to the text that should use it.

Sources & background

Sources supporting this page’s explanations. Practical examples are our editorial suggestions.