Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Conversation

@davidrans
Copy link
Contributor

@davidrans davidrans commented Aug 17, 2022

This changes the default font from Lato -> system fonts.

Closes #566
Same change on the monorepo: https://github.com/iFixit/ifixit/pull/41227

@vercel
Copy link

vercel bot commented Aug 17, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
react-commerce ✅ Ready (Inspect) Visit Preview Aug 17, 2022 at 10:37PM (UTC)
react-commerce-prod ✅ Ready (Inspect) Visit Preview Aug 17, 2022 at 10:37PM (UTC)

@davidrans
Copy link
Contributor Author

deploy_block ✋ on deciding if/when to do this

@dhmacs
Copy link
Contributor

dhmacs commented Aug 18, 2022

@davidrans @federicobadini is already working on this and will post his comments here soon

@davidrans
Copy link
Contributor Author

davidrans commented Aug 18, 2022

Cool, I just made this change so I could poke around and see what it looked like and figured I might as well open a pull. Feel free to close this in favor of @federicobadini's

@federicobadini
Copy link
Contributor

@davidrans I have just a couple of observations that I think it's worth clarifying before proceeding:

  • I think we should remove the lato+ArchivoBlack font imports from _document.tsx
  • We should remove all the fontFamily rules referring to Lato or Archivo Black from code (I can find at least 3 right now)

Finally I see no package.json updates so I think there has been no updates to the core primitives library.
This means that the fonts already defined there have been approved to substitute Lato? Otherwise we have to wait merging this until the right set of fonts is defined and shipped in core primitives.

@davidrans
Copy link
Contributor Author

The core primitives font setting is:
https://github.com/iFixit/core-primitives/blob/8862828cbe89d952c9651f74a1a6b4c442a7bf03/index.json#L240-L247

"sansSystem": "-apple-system, 'Segoe UI', Helvetica, Arial, sans-serif",

@rickisXP rickisXP self-assigned this Aug 19, 2022
@davidrans
Copy link
Contributor Author

This fixes the LCP issues that webpagetest.org was complaining about on mobile:

webpagetest.org output
Before image
After image

@davidrans
Copy link
Contributor Author

  • I think we should remove the lato+ArchivoBlack font imports from _document.tsx
  • We should remove all the fontFamily rules referring to Lato or Archivo Black from code

Makes sense to me. Are you working on that in a separate pull @federicobadini or should I make those changes here?

@sterlinghirsh
Copy link
Member

CR ⚡ dev_block ⚡ on some more info from @federicobadini

@federicobadini federicobadini mentioned this pull request Aug 22, 2022
@federicobadini
Copy link
Contributor

Core primitive sans-serif analysis

Apart from the considerations above, together with @mmarcon91 we have made some research in order to understand how to enrich the system font stack currently present in core-primitives.

We suggest ti add BlinkMacSystemFont, otherwise SF will not be used on Chrome/Chromium based browsers.
Then, given that the current sans-serif stack is almost aligned with the Github one, we propose to align to it completely using both their base font declaration:

-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";

And the associated monospace system font declaration:

ui-monospace, SFMono-Regular, SF Mono, Menlo,Consolas, Liberation Mono, monospace

Next steps

  • I think we should remove the lato+ArchivoBlack font imports from _document.tsx
  • We should remove all the fontFamily rules referring to Lato or Archivo Black from code

Makes sense to me. Are you working on that in a separate pull @federicobadini or should I make those changes here?

I'll close this in favour of #642
It still is a draft PR so that we can discuss if the proposed stack is ok before proceeding further.
If the response will be positive we will then have to wait for the changes to be included in core primitives before merging.

References

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Font swap vs. optional

6 participants