Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ Changed font family from "Open Sans" to "Inter" #1604

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

babakamyljanovssw
Copy link
Member

Relates to #1600

Change font family from "Open Sans" to "Inter"

Copy link
Member

@tiagov8 tiagov8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JackDevAU is correct!

We could embed: https://fonts.google.com/selection/embed

OR self-host: https://fonts.google.com/knowledge/using_type/self_hosting_web_fonts
(I believe this is recommended)

More info: https://www.capitalnumbers.com/blog/self-hosting-vs-google-fonts/

  • 1. Please confirm how Open Sans was implemented (if self-host it's a no-brainer)
  • 2. Implement Inter as per the documentation above

@babakamyljanovssw babakamyljanovssw marked this pull request as draft November 1, 2024 01:18
@babakamyljanovssw
Copy link
Member Author

cc: @JackDevAU
Hi @tiagov8

  1. Please confirm how Open Sans was implemented (if self-host it's a no-brainer)

I couldn't find any code that Open Sans was added as self-host, or as embedded link. But in the dev-tools I noticed that Open Sans came with tailwindcss

  1. Implement Inter as per the documentation above

As per gatsby documentation using web fonts as self-host (recommended option) - https://www.gatsbyjs.com/docs/how-to/styling/using-web-fonts/#self-host-google-fonts-with-fontsource

  • I added @fontsource/inter package
  • Imported Inter styles import '@fontsource/inter'; in gatsby-browser.js
  • Then changed font-family of html tag from Open Sans to Inter in styles.css

image
Figure: Current SSW.Rules with Open Sans font

image
Figure: SSW. Rules with Inter font

@babakamyljanovssw babakamyljanovssw marked this pull request as ready for review November 2, 2024 07:32
@babakamyljanovssw babakamyljanovssw merged commit f4fe309 into main Nov 4, 2024
5 checks passed
@babakamyljanovssw babakamyljanovssw deleted the 1600-change-font branch November 4, 2024 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants