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

rustdoc: add optional woff2 versions of FiraSans. #82545

Merged
merged 2 commits into from
Feb 26, 2021
Merged

Conversation

jsha
Copy link
Contributor

@jsha jsha commented Feb 26, 2021

For browsers that support woff2 (most modern ones:
https://caniuse.com/woff2), this offers a reduction in download size
for these two fonts from 362k to 257k (32% reduction). It decreases the
total page size for struct.String.html (counting all subresources) by
about 2.5%.

If this is interesting, I'm happy to apply the same treatment to the
other fonts, but these two are the biggest.

For browsers that support woff2 (most modern ones:
https://caniuse.com/woff2), this offers a reduction in download size
for these two fonts from 362k to 257k (32% reduction). It decreases the
total page size for `struct.String.html` (counting all subresources) by
about 2.5%.

If this is interesting, I'm happy to apply the same treatment to the
other fonts, but these two are the biggest.
@rust-highfive
Copy link
Collaborator

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez

@rust-highfive
Copy link
Collaborator

r? @jyn514

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 26, 2021
@jsha jsha changed the title Add optional woff2 versions of FiraSans. rustdoc: add optional woff2 versions of FiraSans. Feb 26, 2021
@GuillaumeGomez
Copy link
Member

That's nice, thanks!

New static files, ping @rust-lang/docs-rs !

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Feb 26, 2021

📌 Commit ad7ed13 has been approved by GuillaumeGomez

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 26, 2021
@Nemo157
Copy link
Member

Nemo157 commented Feb 26, 2021

(just as a sanity check I confirmed these are the files from https://github.com/mozilla/Fira/releases/tag/4.202)

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Feb 26, 2021
rustdoc: add optional woff2 versions of FiraSans.

For browsers that support woff2 (most modern ones:
https://caniuse.com/woff2), this offers a reduction in download size
for these two fonts from 362k to 257k (32% reduction). It decreases the
total page size for `struct.String.html` (counting all subresources) by
about 2.5%.

If this is interesting, I'm happy to apply the same treatment to the
other fonts, but these two are the biggest.
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Feb 26, 2021
rustdoc: add optional woff2 versions of FiraSans.

For browsers that support woff2 (most modern ones:
https://caniuse.com/woff2), this offers a reduction in download size
for these two fonts from 362k to 257k (32% reduction). It decreases the
total page size for `struct.String.html` (counting all subresources) by
about 2.5%.

If this is interesting, I'm happy to apply the same treatment to the
other fonts, but these two are the biggest.
This was referenced Feb 26, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 26, 2021
…laumeGomez

Rollup of 8 pull requests

Successful merges:

 - rust-lang#81940 (Stabilize str_split_once)
 - rust-lang#82165 (Reword labels on E0308 involving async fn return type)
 - rust-lang#82456 (Replaced some unwrap_or and map_or with lazy variants)
 - rust-lang#82491 (Consider inexpensive inlining criteria first)
 - rust-lang#82506 (Properly account for non-shorthand pattern field in unused variable lint)
 - rust-lang#82535 (Set codegen thread names)
 - rust-lang#82545 (rustdoc: add optional woff2 versions of FiraSans.)
 - rust-lang#82549 (Revert "Update normalize.css to 8.0.1")

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b4ded5a into rust-lang:master Feb 26, 2021
@rustbot rustbot added this to the 1.52.0 milestone Feb 26, 2021
@jsha jsha deleted the woff2 branch February 27, 2021 00:13
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jun 22, 2021
rustdoc: add optional woff2 versions of Source Serif and Source Code

This provides woff2 versions of Source Serif and Source Code similar to how rust-lang#82545 provides woff2 versions of Fira Sans. The total byte count for the six files (three for each font family) is reduced by 25% from 476 KiB to 358 KiB.
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jun 22, 2021
rustdoc: add optional woff2 versions of Source Serif and Source Code

This provides woff2 versions of Source Serif and Source Code similar to how rust-lang#82545 provides woff2 versions of Fira Sans. The total byte count for the six files (three for each font family) is reduced by 25% from 476 KiB to 358 KiB.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants