mirror of
https://github.com/gotson/komga.git
synced 2026-05-09 05:10:19 +02:00
parent
f46e0406f9
commit
0f05a065ac
1 changed files with 7 additions and 1 deletions
|
|
@ -135,7 +135,13 @@ class FontsController(
|
|||
val srcBlock =
|
||||
fonts.joinToString(separator = ",", postfix = ";") { resource ->
|
||||
val path = Path(resource.uri.toString())
|
||||
"""url('${path.name}') format('${path.extension}')"""
|
||||
val format =
|
||||
when (val extension = path.extension.lowercase()) {
|
||||
"ttf" -> "truetype"
|
||||
"otf" -> "opentype"
|
||||
else -> extension
|
||||
}
|
||||
"""url('${path.name}') format('$format')"""
|
||||
}
|
||||
// language=CSS
|
||||
return """
|
||||
|
|
|
|||
Loading…
Reference in a new issue