How Do I Add Custom Fonts to the Theme?

The Clarity Theme comes pre-installed with the versatile and widely-used 'Poppins' font from Google Fonts, known for its modernity and readability across digital platforms.

Customizing the typography of your website is a powerful way to enhance your brand identity and improve readability. The Clarity Theme comes pre-installed with the versatile and widely-used 'Poppins' font from Google Fonts, known for its modernity and readability across digital platforms. This article guides you through updating and adding custom fonts, like those available from Google Fonts, within the Clarity Theme on HubSpot CMS.

Why Choose Google Fonts?

Google Fonts offers a vast library of open-source fonts that are optimized for web use, ensuring compatibility across devices and browsers. Using Google Fonts allows for easy integration and updates, making them an excellent choice for your website typography needs.

Step 1: Identifying Your Font Needs

Before diving into technical adjustments, decide which fonts align with your brand's visual identity. Google Fonts provides a variety of typefaces, from professional serifs to casual hand-written styles. Consider your website's tone, readability, and overall design when selecting fonts.

Step 2: Locating Fonts on Google Fonts

1. Visit the Google Fonts website https://fonts.google.com.
2. Use the search or filtering options to find the fonts you wish to use.
3. Once you've selected a font, click on it and note the available styles (e.g., regular, bold, italic).

Step 3: Integrating Google Fonts into the Clarity Theme

Integrating Google Fonts into your Clarity Theme is straightforward. Follow these steps to ensure your selected fonts are correctly implemented:

1. **Accessing Theme Settings**:
   - Navigate to your HubSpot dashboard.
   - Go to **Marketing > Files and Templates > Design Tools**.
   - Find your Clarity Theme and open the theme settings.

2. **Adding the Google Font**:
   - Look for the **Fonts** or **Typography** section within the theme settings.
   - You will see an option to add custom fonts. Here, you can input the Google Fonts URL for the fonts you've chosen.
   - To find the URL, on the Google Fonts page for your selected font, click on **Embed** and copy the `<link>` tag provided.

3. **Customizing Theme Fonts**:
   - With the Google Fonts URL added, you can now assign these fonts to different elements of your website (headings, body text, buttons, etc.) directly within the theme settings.
   - Assign your chosen Google Fonts to the desired elements by selecting them from the dropdown menus or input fields provided in the theme settings.

Step 4: Applying and Testing Your Fonts

After integrating and assigning your new Google Fonts, it's crucial to review your website to ensure the fonts display correctly across different browsers and devices. Make adjustments as needed to ensure optimal readability and consistency with your brand identity.

Best Practices and Recommendations

- **Font Pairing**: When selecting multiple fonts, ensure they complement each other and maintain legibility.
- **Load Times**: Be mindful of the number of font styles you integrate, as each requires an additional request that can impact your site's load time. Stick to necessary styles.
- **Fallback Fonts**: Always specify fallback fonts in your CSS to ensure text remains readable if the custom font fails to load.

Customizing your website's typography with Google Fonts through the Clarity Theme enhances your site's aesthetic and aligns with your brand identity. By following the steps outlined above, you can easily integrate and manage custom fonts, giving your website a unique and professional look.

For further assistance or more advanced typography customizations, don't hesitate to reach out to HubSpot's support or consult with a web design professional.