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 brotli decoder and WOFF2 support. #59275

Merged
merged 1 commit into from
Mar 22, 2022
Merged

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Mar 18, 2022

Adds brotli decoder and enables WOFF2 font support.

Note: Adding decoder increase binary size by about 100 KB, but converting all editor and default theme fonts to WOFF2 can decrease it by 4.4 MB. Tested by using https://github.com/google/woff2 on all included fonts, not included into this PR, since quality of conversion need to be tested first.

modules/freetype/SCsub Outdated Show resolved Hide resolved
thirdparty/README.md Outdated Show resolved Hide resolved
COPYRIGHT.txt Outdated Show resolved Hide resolved
@akien-mga
Copy link
Member

Might be useful for the JavaScript platform @Faless @Calinou :)

@Calinou
Copy link
Member

Calinou commented Mar 18, 2022

For reference, WOFF1 support was exposed in #52052.

This is definitely a good thing to have, especially since many web fonts are now distributed in a WOFF2 format only (and using it in another format requires manual conversion).

Having a Brotli decoder will also make it possible to implement support for transparent Brotli compression in HTTPRequest (similar to gzip).

@akien-mga akien-mga merged commit 2a116f6 into godotengine:master Mar 22, 2022
@akien-mga
Copy link
Member

Thanks!

@Calinou
Copy link
Member

Calinou commented Mar 25, 2022

Would it make sense to backport WOFF2 support to 3.x? We can likely get similar benefits for editor binary size there. However, the export templates won't benefit from it as no DynamicFont is embedded in export templates in 3.x. That said, anyone using a DynamicFont in their project can use a WOFF2 conversion tool and probably offset the increase in binary size this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants