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

Icon's non-linear font-scaling doesn't fit the text sizing #593

Closed
hrach opened this issue Dec 8, 2023 · 1 comment
Closed

Icon's non-linear font-scaling doesn't fit the text sizing #593

hrach opened this issue Dec 8, 2023 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@hrach
Copy link
Contributor

hrach commented Dec 8, 2023

Newly, there is the non-linear scaling. Orbit's icon usage is relying on the icon's box height to be the same height as the line height of the accompanying text. I.e. 15sp text with line-height 20sp fits nicely with 20sp tall icon.

The issue now appears when the non-linear scaling applies smaller enlargement on a bigger text. All this is calculated against a sp unit value.

Therefore, in the aforementioned example, this stops working:

  • text 15sp with 1.5 font-scale is ~23sp
  • text's 20sp line-height with 1.5 font-scale is ~26sp
  • icon's 20sp height with 1.5 font-scale is ~26sp

But, this produces a different ratio between the text size and the icon size, which should be/had been ~30sp before (non-linear scaling) and now it is "only" ~26sp.


So there are these options:

  1. Ask Orbit designers to define baseline definitions for icons - this would help in many other cases and we could stop relying on the line-height calculation. But this change is a long shot.
  2. Let it be. Scaled designs are not meant to be pixel-perfect.
  3. Rework the calculation to somehow match the logic -> resolve the actual scaling for 15sp. and then rescale the icon to ~30sp.

Originally posted by @hrach in #564 (comment)

@hrach hrach added the bug Something isn't working label Dec 8, 2023
@hrach hrach added this to the Q1/2024 milestone Dec 8, 2023
@hrach
Copy link
Contributor Author

hrach commented Jan 26, 2024

Agreed with Orbit designers to let it be, at least for now.

@hrach hrach closed this as not planned Won't fix, can't repro, duplicate, stale Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant