---
title: "Set up font libraries and font stacks"
date: "2017-11-10T15:21:51+00:00"
summary: "Streamline your website's typography with Site Studio's font management tools. Learn to set up font libraries, create font stacks, and optimize performance. Ideal for marketers and developers seeking efficient font control."
image:
type: "page"
url: "/drupal-starter-kits/add-ons/site-studio/set-font-libraries-and-font-stacks"
id: "9e33a5ec-a374-45f4-a330-5dfaa0ff865c"
---

Table of contents will be added

Site Studio allows you to manage font libraries and font stacks used by your website. There are two steps to the process:

1.  Set up your font libraries
2.  Set up your font stacks

When setting up font libraries you have three options:

1.  **Upload fonts.** You can upload fonts to your website. When you upload a font it will be hosted with your website in the Site Studio directory. You must ensure that you have the appropriate license to host and serve the font.
2.  **Use web fonts.** You can import fonts from web font providers like Google fonts. These fonts are hosted by the provider so all you need to do is add the URL of the font.
3.  **Use system fonts.** These are fonts that will usually be available on your users device so there's no need for you to provide the font. For example, Arial is a system font and the most widely supported. If using system fonts you can jump straight to [Set up font your stacks](#website-settings-font-libraries-font-stacks) as there are no fonts to upload or import. 

Important

Uploading or importing multiple web fonts will slow down your website loading speed. This is because your website will have to load each font. Only upload or import web fonts that you will use. Remove any fonts you are not using.

Upload fonts
------------

To upload fonts:

1.  Navigate to Site Studio > Website settings > **Font libraries**
2.  Enter the font family in the **Font family** field. **Important -** This will be the name you use when setting your font stack.
3.  Click on the **Upload.zip** button and select your .zip file containing your prepared fonts. The .zip should include your font in EOT, TTF, WOFF and WOFF2 formats. Successfully uploaded font files will be marked with a green tick
4.  Click **Save**

![95e80eeb-upload-font.png](https://acquia.widen.net/content/a86a0f62-0f69-447c-9379-4c8d16c1a9fe/web/95e80eeb-upload-font.png)

Important

To convert a font into EOT, TTF, WOFF and WOFF2 formats there are a number of online converters available.  
  
[https://transfonter.org](https://transfonter.org/)  
[https://www.fontsquirrel.com/tools/webfont-generator](https://www.fontsquirrel.com/tools/webfont-generator)  
[https://www.web-font-generator.com](https://www.web-font-generator.com/)

Adding font license information
-------------------------------

Many premium font providers (E.g. fonts.com, typography.com) require license information to be included with your CSS and a tracking script for page views. If a tracking script is required, this would need to be implemented in a custom theme.

To add license information:

1.  Upload a font, following the steps above
2.  Click the **License** button
3.  Paste in the font License information into the pop-up modal
4.  Click **Save**

![375c4d69-add-font-licence.png](https://acquia.widen.net/content/ff8c3d6f-619a-47e3-9d61-696490bd4cf6/web/375c4d69-add-font-licence.png)

Import web fonts
----------------

To import a web font:

1.  Click on the **Blue button arrow** and select **Import font**
2.  Enter a name in the **Label** field. This is simply a label and has no functional purpose.
3.  Enter the URL of the web font in the **@import** field. As an example, the URL should be formatted like this: https://fonts.googleapis.com/css?family=Poppins:300,400,600
4.  Click **Save**

![df853483-import-font.png](https://acquia.widen.net/content/95e5946b-35d7-46d9-bf08-82ca315003b5/web/df853483-import-font.png)

When uploading a font package into Site Studio, please ensure you only have one instance of each font format (EOT, TTF, WOFF, WOFF2) included.

If your font supports multiple weights, you will need to export each of these as separate packages. You will also need to create separate font stacks for each weight.

Set up your font stacks
-----------------------

Once you've uploaded or imported your fonts you need to set up your font stacks.

To set up your font stacks for imported or uploaded fonts (Highlighted with pink dashed line):

1.  Click on the blue button **Add web font stack**
2.  Enter a name in the **Label** field. This will be used to generate the font SCSS variable and to identify and select your font throughout the Site Studio interface. You can [unlink the label from the SCSS variable](#link-font-stack) if required.
3.  Enter your font stack in the **Font stack** field**.** Your Font stack should be formatted like this: 'Poppins', sans-serif;
4.  If you want to apply font smoothing, Toggle on the **Firefox** and **Webkit** toggles
5.  Click **Save**

Important

If you have uploaded a font, your font stack will need to use the name entered into the **Font family** field. If you have imported a web font, your font stack will need to use the font family specified by the font provider.

To set up a system font stack (Highlighted with blue dashed line):

1.  Click on the **arrow** on the **blue** button
2.  Click on **Add system font stack**
3.  A new system font stack row will be added to your form. Site Studio provides drop down which includes different system font stacks
4.  In the drop-down click on the **system font stack** you want to add
5.  Click **Save**

![ca3bcf7a-font-stacks.png](https://acquia.widen.net/content/5de38647-e67d-476b-9d5a-2fd14f9efc91/web/ca3bcf7a-font-stacks.png)

Important

When using Site Studio sync to export font stacks or Site Studio entities that have a dependency of a font stack such as a base style; the font library is not included as a dependency of font stacks and is therefore not included in the export file. If the font library is required, you should export it separately using Site Studio sync. 

Link/unlink font stack label
----------------------------

When adding a new font stack the label and variable fields are linked by default. You can link or unlink the font stack label from the SCSS variable to allow the label to be different from the variable.

Important

Note you can only change the font stack variable of a font stack that is not in-use.

To unlink a font stack label and variable:

1.  Navigate to Site Studio > Website settings > **Font libraries**
2.  Click the **link icon** next to the label field. The variable field will turn white
3.  Update the font stack label
4.  Click **Save**.

![081a1fc4-unlink-font-stack-label-from-variable.png](https://acquia.widen.net/content/9d8a20d1-1a0a-4720-8e22-a2737dd48869/web/081a1fc4-unlink-font-stack-label-from-variable.png)