-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add support preload fonts #42
Conversation
src/GoogleFonts.php
Outdated
$localizedCss, | ||
); | ||
} | ||
|
||
$this->filesystem->put($this->path($url, 'fonts.css'), $localizedCss); | ||
$this->filesystem->put($this->path($url, 'preload.txt'), $preloadMeta); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be an HTML file to clarify the contents?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, changing the file extension to .html would clarify the contents and make it more understandable, especially if the file contains HTML markup or content that is better represented in an HTML format.
src/Fonts.php
Outdated
protected ?string $localizedUrl = null, | ||
protected ?string $localizedCss = null, | ||
protected ?string $nonce = null, | ||
protected bool $preferInline = false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you avoid the whitespace changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely, I've made sure to avoid any whitespace changes in the commit.
The test of this one are failing, could you take a look @hasan-ahani |
I've addressed the test errors, and everything should be working fine now. Please feel free to let me know if you encounter any further issues. Thanks😊 |
Thanks! |
Hi Spatie team,
Firstly, thank you for developing and maintaining this package!
I've added support for preload functionality to this package. This enhancement enables the preloading of fonts.
Looking forward to your feedback and suggestions.
Best regards