Snowmtl: Change default font family (#6822)
* Change default font family * Fix filename
This commit is contained in:
parent
4e1beae2b7
commit
68ccc79b5b
|
@ -1,7 +1,7 @@
|
|||
ext {
|
||||
extName = 'Snow Machine Translations'
|
||||
extClass = '.SnowmltFactory'
|
||||
extVersionCode = 4
|
||||
extClass = '.SnowmtlFactory'
|
||||
extVersionCode = 5
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ data class Dialog(
|
|||
val angle: Float = 0f,
|
||||
val isBold: Boolean = false,
|
||||
val isNewApi: Boolean = false,
|
||||
val type: String = "sub",
|
||||
val type: String = "normal",
|
||||
private val fbColor: List<Int> = emptyList(),
|
||||
private val bgColor: List<Int> = emptyList(),
|
||||
) {
|
||||
|
|
|
@ -6,7 +6,7 @@ import eu.kanade.tachiyomi.source.Source
|
|||
import eu.kanade.tachiyomi.source.SourceFactory
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
class SnowmltFactory : SourceFactory {
|
||||
class SnowmtlFactory : SourceFactory {
|
||||
override fun createSources(): List<Source> = languageList.map(::Snowmtl)
|
||||
}
|
||||
|
|
@ -125,12 +125,13 @@ class ComposedImageInterceptor(
|
|||
}
|
||||
|
||||
private fun loadAllFont(chain: Interceptor.Chain) {
|
||||
val fallback = loadFont("coming_soon_regular.ttf")
|
||||
fontFamily.keys.forEach { key ->
|
||||
val font = fontFamily[key] ?: return@forEach
|
||||
if (font.second != null) {
|
||||
return@forEach
|
||||
}
|
||||
fontFamily[key] = key to (loadRemoteFont(font.first, chain) ?: loadFont("coming_soon_regular.ttf"))
|
||||
fontFamily[key] = key to (loadRemoteFont(font.first, chain) ?: fallback)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue