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

Composer minimise filesize of fonts? #6

Closed
timmaier opened this issue Dec 13, 2022 · 5 comments
Closed

Composer minimise filesize of fonts? #6

timmaier opened this issue Dec 13, 2022 · 5 comments

Comments

@timmaier
Copy link

timmaier commented Dec 13, 2022

Hey is there a way to omit the following font files from this library?

Found under
/vendor/typesetsh/font-noto/fonts/sans/

NotoSansCJKsc-Bold.otf
NotoSansCJKsc-Regular.otf
NotoSansCJKsc-Light.otf

Together these are equal to ~48MB of size. Which when working with laravel vapors 50MB application upload limit does not bode well.

@timmaier timmaier changed the title Composer filesize fonts? Composer minimise filesize of fonts? Dec 13, 2022
@jsiefer
Copy link
Contributor

jsiefer commented Dec 13, 2022

right,... do you have any option of simply deleting them before deployment as a quick fix?
I'll see if there is something we can do.

@timmaier
Copy link
Author

Sweet thankyou.

Yes simply deleting them before deploy locally works for now. If we start getting these problems in CI/CD we'll have to do that there too.

@jsiefer
Copy link
Contributor

jsiefer commented Dec 15, 2022

We have refactored out those files into an additional package with the next up coming release. This should then allow to create a simple composer replace-package that will remove them or allow to register a custom path where those files can be found. Ill keep you posted on this.

@jsiefer
Copy link
Contributor

jsiefer commented Dec 15, 2022

Hi @timmaier - this package should do the trick for you.

https://github.com/typesetsh/font-noto-cjk-sub

@jsiefer jsiefer closed this as completed Dec 15, 2022
@timmaier
Copy link
Author

Thank you this works perfectly!

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

No branches or pull requests

2 participants