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

Add FontVariation.Settings support to the resources library #5183

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

terrakok
Copy link
Member

Sample:

Text(
    modifier = Modifier.padding(16.dp),
    fontFamily = FontFamily(
        Font(
            Res.font.RobotoFlex_VariableFont,
            variationSettings = FontVariation.Settings(FontVariation.weight(400))
        ),
    ),
    text = "The quick brown fox jumps over the lazy dog"
)

Fixes https://youtrack.jetbrains.com/issue/CMP-7088

Testing

Demo app:
./gradlew :resources:demo:desktopApp:run
image

Release Notes

Highlights - Resources

  • Add FontVariation.Settings support to the resources library

@terrakok
Copy link
Member Author

New API introduced

@terrakok terrakok force-pushed the k.tskh/resources-var-fonts branch from 2c630d7 to 38ada7a Compare December 13, 2024 10:17
@terrakok terrakok force-pushed the k.tskh/resources-var-fonts branch from 38ada7a to bdc717c Compare December 13, 2024 10:53
@terrakok terrakok merged commit 93b2f1d into master Dec 13, 2024
17 of 18 checks passed
@terrakok terrakok deleted the k.tskh/resources-var-fonts branch December 13, 2024 11:41
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.

4 participants