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: Use TTF based font instead of OTF for CJK glyphs to improve readability #90232

Merged
merged 1 commit into from Oct 27, 2021
Merged

Conversation

ghost
Copy link

@ghost ghost commented Oct 24, 2021

Due to Windows' implementation of font rendering, OpenType fonts can be distorted. So the existing font, Noto Sans KR, is not very readable on Windows. This PR improves readability of Korean glyphs on Windows.

Before

원1

After

원2

The fonts included in this PR are licensed under the SIL Open Font License and generated with these commands:

pyftsubset NanumBarunGothic.ttf \
--unicodes=U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF \
--output-file=NanumBarunGothic.ttf.woff --flavor=woff
pyftsubset NanumBarunGothic.ttf \
--unicodes=U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF \
--output-file=NanumBarunGothic.ttf.woff2 --flavor=woff2

r? @GuillaumeGomez

@rust-highfive
Copy link
Collaborator

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 24, 2021
@rust-log-analyzer

This comment has been minimized.

@ghost ghost changed the title rustdoc: use ttf based font for korean glyphs to improve readability rustdoc: use ttf based font instead of otf for cjk glyphs to improve readability Oct 24, 2021
@ghost ghost changed the title rustdoc: use ttf based font instead of otf for cjk glyphs to improve readability rustdoc: use TTF based font instead of OTF for cjk glyphs to improve readability Oct 24, 2021
@ghost ghost changed the title rustdoc: use TTF based font instead of OTF for cjk glyphs to improve readability rustdoc: use TTF based font instead of OTF for CJK glyphs to improve readability Oct 24, 2021
@rust-log-analyzer

This comment has been minimized.

@ghost ghost changed the title rustdoc: use TTF based font instead of OTF for CJK glyphs to improve readability rustdoc: Use TTF based font instead of OTF for CJK glyphs to improve readability Oct 24, 2021
@ghost
Copy link
Author

ghost commented Oct 25, 2021

cc @jsha

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member

Due to Windows' implementation of font rendering, OpenType fonts can be distorted. So the existing font, Noto Sans KR, is not very readable on Windows. This PR improves readability of Korean glyphs on Windows.

The fonts included in this PR are licensed under the SIL Open Font License and generated with these commands:

pyftsubset NanumBarunGothic.ttf \
--unicodes=U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF \
--output-file=NanumBarunGothic.ttf.woff --flavor=woff
pyftsubset NanumBarunGothic.ttf \
--unicodes=U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF \
--output-file=NanumBarunGothic.ttf.woff2 --flavor=woff2

r? @GuillaumeGomez

Can you include this part of your comment into the code as a comment so it's not forgotten please? Here would be perfect.

@GuillaumeGomez
Copy link
Member

Ah you also need to update a GUI test (since you updated the CSS).

@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r+

@bors
Copy link
Contributor

bors commented Oct 26, 2021

📌 Commit 9e00501 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 Oct 26, 2021
@bors
Copy link
Contributor

bors commented Oct 26, 2021

⌛ Testing commit 9e00501 with merge f3e5aa885b606f9c4ac1d8e71be5a32410ececc0...

@bors
Copy link
Contributor

bors commented Oct 26, 2021

💔 Test failed - checks-actions

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

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@ghost
Copy link
Author

ghost commented Oct 26, 2021

It's probably a temporary error. Could someone run that test again?

@bors: retry

@bors
Copy link
Contributor

bors commented Oct 26, 2021

@ghost: 🔑 Insufficient privileges: not in try users

@GuillaumeGomez
Copy link
Member

The CI seems broken for now (a lot of other PRs are failing as well). Better wait when it's been fixed.

@matthiaskrgr
Copy link
Member

@bors retry

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 26, 2021
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 26, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 26, 2021
rustdoc: Use TTF based font instead of OTF for CJK glyphs to improve readability

Due to Windows' implementation of font rendering, OpenType fonts can be distorted. So the existing font, Noto Sans KR, is not very readable on Windows. This PR improves readability of Korean glyphs on Windows.

## Before
![원1](https://user-images.githubusercontent.com/11029378/138592394-16b15787-532d-4421-a5eb-ed85675290fa.png)

## After
![원2](https://user-images.githubusercontent.com/11029378/138592409-f3a440ee-f0fc-40e4-9561-42c479439c9f.png)

The fonts included in this PR are licensed under the SIL Open Font License and generated with these commands:

```sh
pyftsubset NanumBarunGothic.ttf \
--unicodes=U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF \
--output-file=NanumBarunGothic.ttf.woff --flavor=woff
```
```sh
pyftsubset NanumBarunGothic.ttf \
--unicodes=U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF \
--output-file=NanumBarunGothic.ttf.woff2 --flavor=woff2
```

r? `@GuillaumeGomez`
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 27, 2021
…askrgr

Rollup of 3 pull requests

Successful merges:

 - rust-lang#90154 (rustdoc: Remove `GetDefId`)
 - rust-lang#90232 (rustdoc: Use TTF based font instead of OTF for CJK glyphs to improve readability)
 - rust-lang#90278 (rustdoc: use better highlighting for *const, *mut, and &mut)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 60cad97 into rust-lang:master Oct 27, 2021
@rustbot rustbot added this to the 1.58.0 milestone Oct 27, 2021
@rust-lang rust-lang deleted a comment Sep 11, 2023
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.

None yet

6 participants