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

feat: preload common fonts #37349

Merged
merged 1 commit into from Oct 17, 2019

Conversation

ojeytonwilliams
Copy link
Contributor

  • I have read freeCodeCamp's contribution guidelines.
  • My pull request has a descriptive title (not a vague title like Update index.md)
  • My pull request targets the master branch of freeCodeCamp.
  • None of my changes are plagiarized from another source without proper attribution.
  • All the files I changed are in the same world language (for example: only English changes, or only Chinese changes, etc.)
  • My changes do not use shortened URLs or affiliate links.

Without this, some fonts either do not render initially or a fallback is rendered briefly.

Before, using 'Fast 3G' to slow down the load:

LocalMasterFast3g

and after:

LcoalPreloadFast3g

It's most noticeable in the search results, but also some bold and italic text is initially not rendered until the font loads.

I also tried out gatsby-plugin-preload-fonts, but it took about an hour to create the cache and puppeteer apparently did not try to search as the search specific fonts were not preloaded.

This could be improved if we know for sure that some fonts are not universal (Roboto Mono Italics perhaps) as they can be added only on the pages they appear.

Closes #37311

Without this, fonts either do not render initially or a fallback is
rendered briefly.
@ojeytonwilliams ojeytonwilliams added platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. type: feature request Threads classified to be feature requests. Implementation to be considered as a nice to have labels Oct 16, 2019
@ojeytonwilliams ojeytonwilliams requested a review from a team October 16, 2019 20:51
@gitpod-io
Copy link

gitpod-io bot commented Oct 16, 2019

@raisedadead raisedadead merged commit e08ed1e into freeCodeCamp:master Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. type: feature request Threads classified to be feature requests. Implementation to be considered as a nice to have
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search style jumps
2 participants