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

Implement text run “wideness” analysis, and HWID / FWID application #3496

Closed
wants to merge 5 commits into from
Closed

Implement text run “wideness” analysis, and HWID / FWID application #3496

wants to merge 5 commits into from

Conversation

reli-msft
Copy link

@reli-msft reli-msft commented Nov 8, 2019

Summary of the Pull Request

References

PR Checklist

  • Closes #xxx
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed There are no tests for CustomTextLayout yet.
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

In a comment to #2066 I said that:

If a text run is considered only having 0 or 1-cell characters, we apply hwid to them, so font makers can switch their glyphs to a narrower one.
For a text run considered only having 0 or 2-cell characters, apply fwid instead.
This is somehow like how UAX #50 works: Analyze runs first, then apply vert on upright runs and vrtr on rotated runs.

What it does it we added an extra analysis pass for text “wideness” analysis to further break text runs into "narrow" and "wide". After that, when we perform shaping, we apply hwid feature for narrow runs and fwid for wide to let the font we are using know what is the desired wideness the Terminal want. If a font support that (like Iosevka), it would transform the glyphs to the ones with proper width so the text won't get scaled.

Validation Steps Performed

Install font Iosevka, and print the character .
It should be shown in a narrow oval, instead of a scaled-down circle.

@reli-msft
Copy link
Author

Close for now. CustomTextLayout has the concept of clusters but it is not properly used.
We need some rewrite...

@reli-msft reli-msft closed this Nov 8, 2019
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

Successfully merging this pull request may close these issues.

1 participant