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

Add support preload fonts #42

Merged
merged 5 commits into from
Mar 5, 2024
Merged

Conversation

hasan-ahani
Copy link
Contributor

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

$localizedCss,
);
}

$this->filesystem->put($this->path($url, 'fonts.css'), $localizedCss);
$this->filesystem->put($this->path($url, 'preload.txt'), $preloadMeta);
Copy link
Member

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?

Copy link
Contributor Author

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,
Copy link
Member

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?

Copy link
Contributor Author

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.

@freekmurze
Copy link
Member

The test of this one are failing, could you take a look @hasan-ahani

@hasan-ahani
Copy link
Contributor Author

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😊
@freekmurze

@sebastiandedeyne sebastiandedeyne merged commit 6e253a8 into spatie:main Mar 5, 2024
@sebastiandedeyne
Copy link
Member

Thanks!

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