@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME |
||||
distributionPath=wrapper/dists |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip |
||||
zipStoreBase=GRADLE_USER_HOME |
||||
zipStorePath=wrapper/dists |
||||
|
Before Width: | Height: | Size: 468 KiB After Width: | Height: | Size: 468 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME |
||||
distributionPath=wrapper/dists |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip |
||||
zipStoreBase=GRADLE_USER_HOME |
||||
zipStorePath=wrapper/dists |
||||
|
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME |
||||
distributionPath=wrapper/dists |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip |
||||
zipStoreBase=GRADLE_USER_HOME |
||||
zipStorePath=wrapper/dists |
||||
|
@ -1,16 +0,0 @@
|
||||
package org.jetbrains.codeviewer.platform |
||||
|
||||
import android.annotation.SuppressLint |
||||
import androidx.compose.runtime.Composable |
||||
import androidx.compose.ui.platform.LocalContext |
||||
import androidx.compose.ui.text.font.Font |
||||
import androidx.compose.ui.text.font.FontStyle |
||||
import androidx.compose.ui.text.font.FontWeight |
||||
|
||||
@SuppressLint("DiscouragedApi") |
||||
@Composable |
||||
actual fun font(name: String, res: String, weight: FontWeight, style: FontStyle): Font { |
||||
val context = LocalContext.current |
||||
val id = context.resources.getIdentifier(res, "font", context.packageName) |
||||
return Font(id, weight, style) |
||||
} |
@ -1,9 +0,0 @@
|
||||
package org.jetbrains.codeviewer.platform |
||||
|
||||
import androidx.compose.runtime.Composable |
||||
import androidx.compose.ui.text.font.Font |
||||
import androidx.compose.ui.text.font.FontStyle |
||||
import androidx.compose.ui.text.font.FontWeight |
||||
|
||||
@Composable |
||||
expect fun font(name: String, res: String, weight: FontWeight, style: FontStyle): Font |
@ -1,10 +0,0 @@
|
||||
package org.jetbrains.codeviewer.platform |
||||
|
||||
import androidx.compose.runtime.Composable |
||||
import androidx.compose.ui.text.font.Font |
||||
import androidx.compose.ui.text.font.FontStyle |
||||
import androidx.compose.ui.text.font.FontWeight |
||||
|
||||
@Composable |
||||
actual fun font(name: String, res: String, weight: FontWeight, style: FontStyle): Font = |
||||
androidx.compose.ui.text.platform.Font("font/$res.ttf", weight, style) |
@ -1,23 +0,0 @@
|
||||
package org.jetbrains.codeviewer.platform |
||||
|
||||
import androidx.compose.runtime.Composable |
||||
import androidx.compose.runtime.remember |
||||
import androidx.compose.ui.text.font.Font |
||||
import androidx.compose.ui.text.font.FontStyle |
||||
import androidx.compose.ui.text.font.FontWeight |
||||
import kotlinx.coroutines.runBlocking |
||||
import org.jetbrains.compose.resources.ExperimentalResourceApi |
||||
import org.jetbrains.compose.resources.resource |
||||
|
||||
private val cache: MutableMap<String, Font> = mutableMapOf() |
||||
|
||||
@OptIn(ExperimentalResourceApi::class) |
||||
@Composable |
||||
actual fun font(name: String, res: String, weight: FontWeight, style: FontStyle): Font { |
||||
return cache.getOrPut(res) { |
||||
val byteArray = runBlocking { |
||||
resource("font/$res.ttf").readBytes() |
||||
} |
||||
androidx.compose.ui.text.platform.Font(res, byteArray, weight, style) |
||||
} |
||||
} |
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME |
||||
distributionPath=wrapper/dists |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip |
||||
zipStoreBase=GRADLE_USER_HOME |
||||
zipStorePath=wrapper/dists |
||||
|
Before Width: | Height: | Size: 896 B After Width: | Height: | Size: 896 B |
Before Width: | Height: | Size: 780 B After Width: | Height: | Size: 780 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
@ -1,3 +1,5 @@
|
||||
kotlin.code.style=official |
||||
kotlin.version=1.9.22 |
||||
compose.version=1.6.0 |
||||
org.gradle.configuration-cache=true |
||||
org.gradle.caching=true |
||||
|
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME |
||||
distributionPath=wrapper/dists |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip |
||||
zipStoreBase=GRADLE_USER_HOME |
||||
zipStorePath=wrapper/dists |
||||
|
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME |
||||
distributionPath=wrapper/dists |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip |
||||
zipStoreBase=GRADLE_USER_HOME |
||||
zipStorePath=wrapper/dists |
||||
|
@ -1,3 +1,5 @@
|
||||
kotlin.code.style=official |
||||
kotlin.version=1.9.22 |
||||
compose.version=1.6.0 |
||||
org.gradle.configuration-cache=true |
||||
org.gradle.caching=true |
||||
|
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME |
||||
distributionPath=wrapper/dists |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip |
||||
zipStoreBase=GRADLE_USER_HOME |
||||
zipStorePath=wrapper/dists |
||||
|
@ -1,3 +1,5 @@
|
||||
kotlin.code.style=official |
||||
kotlin.version=1.9.22 |
||||
compose.version=1.6.0 |
||||
org.gradle.configuration-cache=true |
||||
org.gradle.caching=true |
||||
|
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME |
||||
distributionPath=wrapper/dists |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip |
||||
zipStoreBase=GRADLE_USER_HOME |
||||
zipStorePath=wrapper/dists |
||||
|
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME |
||||
distributionPath=wrapper/dists |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip |
||||
zipStoreBase=GRADLE_USER_HOME |
||||
zipStorePath=wrapper/dists |
||||
|
@ -1,3 +1,5 @@
|
||||
kotlin.code.style=official |
||||
kotlin.version=1.9.22 |
||||
compose.version=1.6.0 |
||||
org.gradle.configuration-cache=true |
||||
org.gradle.caching=true |
||||
|
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME |
||||
distributionPath=wrapper/dists |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip |
||||
zipStoreBase=GRADLE_USER_HOME |
||||
zipStorePath=wrapper/dists |
||||
|
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME |
||||
distributionPath=wrapper/dists |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip |
||||
zipStoreBase=GRADLE_USER_HOME |
||||
zipStorePath=wrapper/dists |
||||
|
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME |
||||
distributionPath=wrapper/dists |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip |
||||
zipStoreBase=GRADLE_USER_HOME |
||||
zipStorePath=wrapper/dists |
||||
|
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME |
||||
distributionPath=wrapper/dists |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip |
||||
zipStoreBase=GRADLE_USER_HOME |
||||
zipStorePath=wrapper/dists |
||||
|
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME |
||||
distributionPath=wrapper/dists |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip |
||||
zipStoreBase=GRADLE_USER_HOME |
||||
zipStorePath=wrapper/dists |
||||
|
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME |
||||
distributionPath=wrapper/dists |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip |
||||
zipStoreBase=GRADLE_USER_HOME |
||||
zipStorePath=wrapper/dists |
||||
|
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME |
||||
distributionPath=wrapper/dists |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip |
||||
zipStoreBase=GRADLE_USER_HOME |
||||
zipStorePath=wrapper/dists |
||||
|
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME |
||||
distributionPath=wrapper/dists |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip |
||||
zipStoreBase=GRADLE_USER_HOME |
||||
zipStorePath=wrapper/dists |
||||
|
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME |
||||
distributionPath=wrapper/dists |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip |
||||
zipStoreBase=GRADLE_USER_HOME |
||||
zipStorePath=wrapper/dists |
||||
|