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

Update dependency org.jetbrains.compose to v1.7.0 #424

Merged
merged 3 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compose/src/skiaMain/kotlin/DrawText.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package com.juul.krayon.compose

import androidx.compose.ui.graphics.nativeCanvas
import com.juul.krayon.kanvas.Paint
import org.jetbrains.skia.FontMgr
import org.jetbrains.skia.FontStyle
import org.jetbrains.skia.TextLine
import org.jetbrains.skia.Typeface
import org.jetbrains.skia.Font as SkiaFont
import org.jetbrains.skia.Paint as SkiaPaint

Expand All @@ -28,7 +28,7 @@ private fun CharSequence.toTextLine(paint: Paint.Text): TextLine =

private fun Paint.Text.toSkiaFont(): SkiaFont {
// TODO: Verify that this font behavior works as desired when using bold-fonts explicitly by name.
val typeface = Typeface.makeFromName(font.names.first(), FontStyle.NORMAL)
val typeface = FontMgr.default.legacyMakeTypeface(font.names.first(), FontStyle.NORMAL)
return SkiaFont(typeface, size)
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ agp = "8.7.1" # 7.4.1 is the maximum version supported by IDEA 2023.1
android-compile = "34"
android-min = "21"
android-target = "32"
compose = "1.6.11"
compose = "1.7.0"
coroutines = "1.9.0"
jacoco = "0.8.7"
jvm-toolchain = "11"
Expand Down
Loading