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

Support configurable vertical centering via LineHeightStyle.Alignment #1569

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

MatkovIvan
Copy link
Member

@MatkovIvan MatkovIvan commented Sep 16, 2024

Fixes JetBrains/compose-multiplatform#2602 (CMP-2602)

Desktop Android

Testing

Added a sample page into mpp demo
This should be tested by QA

Release Notes

Features - Multiple Platforms

  • Support configurable vertical text centering via LineHeightStyle.Alignment

@MatkovIvan MatkovIvan changed the title Ivan.matkov/text v center Support configurable vertical centering via LineHeightStyle.Alignment Sep 16, 2024
MatkovIvan added a commit to JetBrains/skiko that referenced this pull request Sep 18, 2024
Support configurable vertical centering for implementing Compose's
`LineHeightStyle.Alignment`.

https://youtrack.jetbrains.com/issue/CMP-2602

See also:
- JetBrains/skia#5
- JetBrains/compose-multiplatform-core#1569
@MatkovIvan MatkovIvan marked this pull request as ready for review September 18, 2024 19:27
Copy link
Collaborator

@eymar eymar left a comment

Choose a reason for hiding this comment

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

LGTM!
Do we need to automate the tests for this change to not miss regressions?
I guess the only way to automate the tests for this is screenshot tests with a hardcoded font (loaded from resources).
Perhaps 1 big test (screenshot) with 4x4 variants like in your demo would work.

@MatkovIvan
Copy link
Member Author

Screenshot tests for text/font is a separate story, that we should definitely handle. But I believe that such setup is out of the scope of this PR

@MatkovIvan MatkovIvan merged commit 5b07907 into jb-main Sep 23, 2024
6 checks passed
@MatkovIvan MatkovIvan deleted the ivan.matkov/text-v-center branch September 23, 2024 08:00
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.

Support TextStyle.lineHeightStyle
2 participants