litespeedtech / litespeedtech/lscache_wp
Load Google Fonts Asynchronously - not loading all weights with css2
- Dominant language
- PHP
- Stars
- 257
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
Looks like google fonts are not fully loaded when the embed code uses the new API `css2`. Only the default weight (400) is being pulled.
Url is build like this:
https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap
Looks like webfontloader doesnt handle css2 correctly. Might need a library update. Found one very old issue still open https://github.com/typekit/webfontloader/issues/430 Not sure when google made a switch, but they generate embed codes now on google fonts with the css2 links.
Old API with links https://fonts.googleapis.com/css?family=Manrope:300,400,600,700,800 work ok.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how the plugin uses Web Font Loader with Google Fonts URLs, then compare the css2 URL using the Manrope 200–800 range with the older css URL format. Confirm that loading the css2 embed makes all requested font weights available rather than only weight 400.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, wordpress
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100