Version:

Acquia Cohesion renames to Site Studio from version 6.2. Tell me more.

    Set up font libraries and font stacks

    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 licence 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 as there are no fonts to upload or import. 

    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. Select the font display. For more information, see https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display
    5. Click Save

    To convert a font into EOT, TTF, WOFF and WOFF2 formats there are a number of online converters available.

    https://transfonter.org
    https://www.fontsquirrel.com/tools/webfont-generator
    https://www.web-font-generator.com

    Adding font license information

    Many premium font providers (E.g. fonts.com, typography.com) require licence 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

    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

    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 if required.
    3. Enter your font stack in the Font stack fieldYour 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

    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

    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.

    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.

    DX8 knowledge base icon

    Frequently asked questions

    Get instant answers to common questions. Available online 24/7.

    Find answers

    Raise a ticket icon

    Raise a support ticket

    To raise a ticket, sign into Acquia Cloud and select Help in the top menu.

    Raise support ticket

    Acquia

    Copyright © 2020 Acquia, Inc. All Rights Reserved. Drupal is a registered trademark of Dries Buytaert.