Update FontsModule.kt

This commit is contained in:
OTKUSteyler 2026-09-12 12:41:28 +02:00 • committed by GitHub
parent 9611038048
commit a5af0bddb8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -29,6 +29,14 @@ import kotlinx.serialization.json.put
import java.io.File import java.io.File
import java.io.IOException import java.io.IOException
// NOTE: These extensions used to be resolved from a shared Utils/Extensions file,
// but that reference broke (renamed/removed/relocated), causing "Unresolved reference"
// build failures. Defining them locally here removes the dependency on that file.
// asFile(): ensures the parent directory of a file exists.
// asDir(): ensures the directory itself exists.
private fun File.asFile(): File = apply { parentFile?.mkdirs() }
private fun File.asDir(): File = apply { mkdirs() }
@Serializable @Serializable
data class FontDefinition( data class FontDefinition(
val name: String? = null, val name: String? = null,