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

Text rendering quality improvements. #3855

Merged
merged 9 commits into from
Nov 8, 2022
Merged

Conversation

wdanilo
Copy link
Member

@wdanilo wdanilo commented Nov 5, 2022

Pull Request Description

This PR:

  • Adds proper suport for mplus1p font. You can use it now without issues. The default app font should be switched to this font in the future.
  • Ads additional hinting mechanisms per font and per operating system to increase font rendering quality. In case of any bad issues, let me know.

Important

The glyph hinting could not work perfectly on all systems. It looks really good now on macOS (retinas), but can be suboptimal on Linux and Windows. We need to update MSDFgen library to fix some bugs and after that, the hinting on these systems will improve.

Checklist

Please include the following checklist in your PR:

  • The documentation has been updated if necessary.
  • All code conforms to the
    Scala,
    Java,
    and
    Rust
    style guides.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed: Enso GUI was tested when built using BOTH
      ./run ide build and ./run ide watch.

@wdanilo wdanilo changed the title Init Text rendering quality improvements. Nov 8, 2022
@wdanilo wdanilo marked this pull request as ready for review November 8, 2022 17:30
Comment on lines +46 to +47
/// Also, you can interactively change the values by holding `ctrl + alt + o` or `ctrl + alt + e`
/// keys and using the `+` and `-` key to increment or decrement the value.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Known to not work on Windows.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be fixed one day :(

lazy_static! {
/// A global hinting map for fonts. Map a platform and a font nam pair to hinting information.
/// See [`Hinting`] to learn more.
pub static ref HINTING_MAP: HashMap<(Option<platform::Platform>, &'static str), Hinting> =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wdanilo wdanilo merged commit cee7f27 into develop Nov 8, 2022
@wdanilo wdanilo deleted the wip/wdanilo/mplus1-183706870 branch November 8, 2022 18:15
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.

None yet

2 participants