# Google Fonts

**URL:** https://meta.discourse.org/t/google-fonts/143720
**Category:** Theme component
**Tags:** official, google-fonts
**Created:** [March 9, 2020, 5:22pm UTC](https://meta.discourse.org/t/google-fonts/143720 "2020-03-09T17:22:09Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![Discourse](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discourse/32/148734_2.png) [@Discourse](https://meta.discourse.org/u/Discourse)
#### Post date: [March 9, 2020, 5:22pm UTC](https://meta.discourse.org/t/google-fonts/143720/1 "2020-03-09T17:22:09Z")

</div>

| | | |
| --- | --- | --- |
| :discourse2: | **Summary** | **Google Fonts** is a simple theme component that allows you to add a font from [Google Fonts](https://fonts.google.com/) without writing any CSS. |
| 👓 | **Preview** | [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/google-fonts) |
| 🛠 | **Repository Link** | [https://github.com/discourse/discourse-google-font-component](https://github.com/discourse/discourse-google-font-component) |
| 📖 | **New to Discourse Themes?** | [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) |

Install this theme component

> [@](#):
>
> :discourse2: As this is an #official theme component maintained by the Discourse team, #Support, #Contribute > Bug, #Contribute > UX, and #Contribute > Feature requests can be made in the respective categories here on Meta, and tagged with the appropriate theme component tag. Click on a link below to get one started. 👍
> 
> [❓&nbsp; **Support**](https://meta.discourse.org/new-topic?category_id=6&tags=google-fonts "Ask for support on configuring and using Google Fonts") [🐛&nbsp; **Bug**](https://meta.discourse.org/new-topic?category_id=1&tags=google-fonts "A bug report means something is broken, preventing normal/typical use of the theme component") [👀&nbsp; **UX**](https://meta.discourse.org/new-topic?category_id=9&tags=google-fonts "Discussion about the user interface of Google Fonts, and how features are presented (including language and UI elements)") [💡&nbsp; **Feature**](https://meta.discourse.org/new-topic?category_id=2&tags=google-fonts "Discussion about how existing Google Fonts features can be improved or enhanced, and how proposed new features could work")

### Features

This component allows you to set the main site font, and optionally separate fonts for headlines and monospaced text (code blocks). You can also choose a font weight in each case, and increase the font size.

Behind the scenes this sets up a little bit of CSS along with Google’s font `<link>`. Note that this is relying on Google to serve the font files from `https://fonts.googleapis.com/`.

### Settings

| Name | Description |
| --- | --- |
| fonts | Add the name of the font(s) you want to use from [fonts.google.com](https://fonts.google.com/). Note that font names are CaSe SeNsiTivE! |
| body font | The main font used throughout Discourse, must be included in “fonts” setting above |
| body font weight | Font thickness in the range of 100-900. 400 is normal, 700 is bold |
| headline font | Optional font for headlines, must be included in “fonts” setting above |
| headline font weight | Font thickness in the range of 100-900. 400 is normal, 700 is bold |
| monospaced font | Optional font for code blocks, must be included in “fonts” setting above. |
| monospaced font weight | Font thickness in the range of 100-900. 400 is normal, 700 is bold |
| normal font size | Default font size for all users, adjusting this will adjust all font sizes proportionately |
| smaller font size | Selectable in each user’s interface preferences |
| larger font size | Selectable in each user’s interface preferences |
| largest font size | Selectable in each user’s interface preferences |

  

> :discourse2: **Hosted by us?** Theme components are available to use on our Standard, Business, and Enterprise plans.

> Last edited by @awesomerobot 2025-03-14T15:46:34Z
> 
> > **Check document**
> >
> > Perform check on document:

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [March 25, 2020, 11:19pm UTC](https://meta.discourse.org/t/google-fonts/143720/4 "2020-03-25T23:19:47Z")

</div>

This Fantastic! Can this be installed Multiple Times to link to different themes by changing it’s Name in Advanced install?

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [March 26, 2020, 5:31am UTC](https://meta.discourse.org/t/google-fonts/143720/5 "2020-03-26T05:31:28Z")

</div>

I don’t see why not. We’ve installed the same theme twice, for example here on Meta to have both a light and dark version.

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [March 26, 2020, 12:09pm UTC](https://meta.discourse.org/t/google-fonts/143720/6 "2020-03-26T12:09:02Z")

</div>

Thanks. Forgot you can rename it to identify/link it to other themes.

---

<div class="post-metadata">

### Author: ![Bank\_Live](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bank_live/32/75893_2.png) [@Bank\_Live](https://meta.discourse.org/u/Bank_Live)
#### Post date: [April 14, 2020, 7:23am UTC](https://meta.discourse.org/t/google-fonts/143720/7 "2020-04-14T07:23:44Z")

</div>

Thank you. I love it. 😁

---

<div class="post-metadata">

### Author: ![PaulinaMX](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paulinamx/32/210473_2.png) [@PaulinaMX](https://meta.discourse.org/u/PaulinaMX)
#### Post date: [August 9, 2020, 8:31am UTC](https://meta.discourse.org/t/google-fonts/143720/9 "2020-08-09T08:31:36Z")

</div>

Thanks ❤ I really love it.

---

<div class="post-metadata">

### Author: ![MarcP](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcp/32/160184_2.png) [@MarcP](https://meta.discourse.org/u/MarcP)
#### Post date: [October 23, 2022, 1:52pm UTC](https://meta.discourse.org/t/google-fonts/143720/21 "2022-10-23T13:52:43Z")

</div>

I just discovered that this component does not work for /pub/ (published) pages. The fonts are not loading on these pages resulting in a default Times New Roman alike font.

---

<div class="post-metadata">

### Author: ![slambert](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/slambert/32/110945_2.png) [@slambert](https://meta.discourse.org/u/slambert)
#### Post date: [October 26, 2022, 3:22am UTC](https://meta.discourse.org/t/google-fonts/143720/22 "2022-10-26T03:22:15Z")

</div>

I’m seeing default fonts as well, but on the

`https://yoursite.org/u/activate-account/...` activate account page

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [June 5, 2023, 1:51pm UTC](https://meta.discourse.org/t/google-fonts/143720/23 "2023-06-05T13:51:28Z")

</div>

I tried and this is indeed an issue.

The published page tries to load the google font through the theme component:

![image](https://global.discourse-cdn.com/meta/original/4X/2/c/0/2c0848316c968e8e503a821e4cd01bd2c9293e69.png)

The font file not being loaded on the published page, it doesn’t fall back to the font-family variable `Arial, sans-serif and uses Times New Roman instead.

There may be room for improvement here as long as the published pages can access the modifications required.

---

<div class="post-metadata">

### Author: ![MarcP](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcp/32/160184_2.png) [@MarcP](https://meta.discourse.org/u/MarcP)
#### Post date: [June 6, 2023, 2:24am UTC](https://meta.discourse.org/t/google-fonts/143720/24 "2023-06-06T02:24:21Z")

</div>

To be honest ever since this discovery I define my fonts in custom CSS. Works great.

---

<div class="post-metadata">

### Author: ![hoangphuctran93](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hoangphuctran93/32/290976_2.png) [@hoangphuctran93](https://meta.discourse.org/u/hoangphuctran93)
#### Post date: [January 29, 2024, 1:04am UTC](https://meta.discourse.org/t/google-fonts/143720/29 "2024-01-29T01:04:50Z")

</div>

That’s awesome, thank you and your team for developing such a convenient feature ^^. I will recommend it to people I know who are using discourse to build user communities.

---

<div class="post-metadata">

### Author: ![slambert](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/slambert/32/110945_2.png) [@slambert](https://meta.discourse.org/u/slambert)
#### Post date: [May 16, 2024, 12:00am UTC](https://meta.discourse.org/t/google-fonts/143720/33 "2024-05-16T00:00:30Z")

</div>

Quick bug report: I just noticed when I set the font weight then bold text doesn’t show up as bold.

I tested this with the fonts `Work Sans` and `Zilla Slab`. I changed the font weight from the default (400) to 300. When I did this bold text did not appear bold. Reset that setting and the bold text reappears.

I set it to 400 and called it a day, but wanted to let you know.

Thanks for your work on this!

---

<div class="post-metadata">

### Author: ![hazenbiz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hazenbiz/32/442603_2.png) [@hazenbiz](https://meta.discourse.org/u/hazenbiz)
#### Post date: [August 22, 2024, 3:06am UTC](https://meta.discourse.org/t/google-fonts/143720/34 "2024-08-22T03:06:16Z")

</div>

Any way to get into the nitty gritty a little more? The “Headline” font is coming up as 900 weight by default with Headers inside of Topics. Would be great to set the defaults for each of those Markdown objects.

---

<div class="post-metadata">

### Author: ![Shauny](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/shauny/32/362012_2.png) [@Shauny](https://meta.discourse.org/u/Shauny)
#### Post date: [February 18, 2025, 5:06pm UTC](https://meta.discourse.org/t/google-fonts/143720/36 "2025-02-18T17:06:13Z")

</div>

There seems to be a bug with this, at least on my forum, if I add the font “Inter” with this component then the following happens:

- Start editing or composing a message
- Switch apps to something else while composer is open
- Come back, and the zoom is all wrong, like it’s too far zoomed in
- There will also be bugs with Chat and with scrolling now

Not sure if it happens with other fonts, but it happens 100% of the time if I add this component to any theme.

Is this a known bug? Is there a fix?

Thanks

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [February 18, 2025, 6:33pm UTC](https://meta.discourse.org/t/google-fonts/143720/37 "2025-02-18T18:33:22Z")

</div>

We have Inter already built-in if you want to change the `Base font` and `Heading font` under admin \> site settings, no component necessary

---

<div class="post-metadata">

### Author: ![WorldIsMine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/worldismine/32/455660_2.png) [@WorldIsMine](https://meta.discourse.org/u/WorldIsMine)
#### Post date: [March 13, 2025, 5:43pm UTC](https://meta.discourse.org/t/google-fonts/143720/38 "2025-03-13T17:43:25Z")

</div>

Which version of Discourse? Am on 3.3 stable and don’t see Inter. Having the same problems as some of the users here with this component.

I am on 3.3 and want to use Inter. While the font loads, BOLD text isn’t bold.

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [March 13, 2025, 6:26pm UTC](https://meta.discourse.org/t/google-fonts/143720/39 "2025-03-13T18:26:23Z")

</div>

You’ll need to update to 3.4 for the built-in Inter option

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [March 14, 2025, 3:50pm UTC](https://meta.discourse.org/t/google-fonts/143720/40 "2025-03-14T15:50:26Z")

</div>

I’ve just merged a refactor of this component that better aligns with Google Font updates — this should fix some issues people were having with different weights not appearing.

Note that the setting formatting changed slightly so that weights can no longer be included in the font name setting like `Roboto:300,300i,500`, and this would have to be updated to a simple `Roboto`… but it should migrate automatically on update.
