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 a setting to control vertical antialiasing #5093

Open
Tracked by #1790
ygohko opened this issue Mar 23, 2020 · 3 comments
Open
Tracked by #1790

Add a setting to control vertical antialiasing #5093

ygohko opened this issue Mar 23, 2020 · 3 comments
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Help Wanted We encourage anyone to jump in on these. Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.
Milestone

Comments

@ygohko
Copy link

ygohko commented Mar 23, 2020

Description of the new feature/enhancement

Adding a setting to control DirectWrite's rendering mode is wanted to improve font rendering quality when using a font that does not have hinting information.

I prefer NasuM font (https://osdn.net/users/itouhiro/pf/font/files/) because it has high readability. But it does not have hinting information and it causes decrasing rendering quality in Windows Terminal.

Below is a screenshot that taken from Windows Terminal with using NasuM font:
Terminal

Below is a screenshot that taken from WSL window with using NasuM font:
WSL

Please focus on horizontal lines in the Kanji character "見".

Windows's legacy command window uses GDI and now it supports vertical antialiasing (I believe), but Windows Terminal does not support that.

If Windows Terminal has a setting to enable vertical antialiasing, it can improve font rendering quality at this situation.

Proposed technical implementation details (optional)

Firefox has a hidden setting to control DirectWrite's rendering mode (https://support.mozilla.org/en-US/questions/1115938). When gfx.font_rendering.cleartype_params.rendering_mode is 5 (Natural Symmetric), Firefox enables vertical antialiasing.

If Windows Terminal has similar one, it would solve this problem.

@ygohko ygohko added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Mar 23, 2020
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Mar 23, 2020
@DHowett-MSFT DHowett-MSFT changed the title Add a setting to control DirectWrite's rendering mode Add a setting to control vertical antialiasing Mar 24, 2020
@DHowett-MSFT
Copy link
Contributor

I'm repurposing this one for vertical antialiasing specifically, because we have an epic for all rendering flags at #1790. I've linked them and put this one on the backlog.

Thanks!

@DHowett-MSFT DHowett-MSFT added Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Help Wanted We encourage anyone to jump in on these. Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Mar 24, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Mar 24, 2020
@DHowett-MSFT DHowett-MSFT added this to the Terminal Backlog milestone Mar 24, 2020
@zadjii-msft
Copy link
Member

A bunch of relevant links:

  • ClearType TextRenderingMode uses incorrect DWrite rendering mode dotnet/wpf#2025 - this is at least a neat thread that says the Terminal is rendering text better than Visual Studio 😆
  • DWRITE_RENDERING_MODE which has DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC

    Similar to natural mode except that antialiasing is performed in both the horizontal and vertical directions.
    This is typically used at larger sizes to make curves and diagonal lines look smoother. The antialiasing may be either ClearType or grayscale depending
    on the text antialiasing mode.

@ygohko
Copy link
Author

ygohko commented Jan 14, 2021

I found information (https://qiita.com/AumyF/items/4f625ebd47603efaac7a Japanese, please read with mechanical translation) that may relates this issue. This issue may not be caused by font that does not have hinting information, but may be caused by font that have low quality hinting information.

I had made a dehinted font and set it for Windows Terminal, then rendering quality was improved as below:
After

Now my problem was solved, but I think this issue (vertical antialiasing setting) may be still useful for other people who can not modify fonts.

Thanks!

@zadjii-msft zadjii-msft modified the milestones: Terminal Backlog, Backlog Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Help Wanted We encourage anyone to jump in on these. Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

3 participants