-
Notifications
You must be signed in to change notification settings - Fork 85
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
Non-linear font scaling #1867
base: jb-main
Are you sure you want to change the base?
Non-linear font scaling #1867
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LDTM with 2 minor comments.
Thank you for the contribution!
import androidx.compose.ui.unit.fontscaling.FontScaleConverterTable | ||
|
||
internal actual fun isNonLinearFontScalingActive(fontScale: Float): Boolean { | ||
return fontScale >= UIKitContentSize.ExtraSmall.fontScale && fontScale !in 0.97f..1.03f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please leave a comment in the code about these constants: 0.97f..1.03f
?
*/ | ||
@Immutable | ||
@JvmDefaultWithCompatibility | ||
actual interface FontScaling { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That will change Desktop API. Please run ./gradlew desktopApiDump
.
@igordmn , since there are changes in Desktop API, we need your approval. |
Adapt Android non-linear font scaling and map Dynamic Type HIG to font scaling tables on IOS
Fixes https://youtrack.jetbrains.com/issue/CMP-738/Support-non-linear-text-scale-for-other-platforms
Testing
FontScalingTest.uikit.kt
This should be tested by QA
Release Notes
Features - iOS
Density
now performs non-linear font scaling and conforms to HIG