Skip to main content
All CollectionsStyleguide
Custom Fonts: Self-hosting
Custom Fonts: Self-hosting

If do not use a default or Google font you can host your own and add to your Candu Styleguide.

Flora Sanders avatar
Written by Flora Sanders
Updated over a week ago

Self-hosting a custom font

If your custom font does not appear in Candu's list of default fonts and is not hosted as a Google font, you will need to upload your font to a static location on a self-hosted CDN.

You will then need to create a CSS file that references the font, which can be as simple as:

@font-face { 
font-family: 'Open Sans';
src: url("https://cdn-staging.candu.ai/example/fonts/OpenSans-Italic-VariableFont_wdth,wght.ttf");
}

To fetch this file, it must be available with appropriate CORS headers for the Candu domain.

Once you are hosting your font, you can add this to the custom font section in your Styleguide.

Paste the URL link into the custom font section, and it should then be available to select as a custom font for typography elements.

ℹ️ Please note you will need to do this for each Text type.

Did this answer your question?