pull/68/head^2
kunfei 5 years ago
parent 65bdc5541c
commit fc1d36d1c8
  1. 8
      app/src/main/java/io/legado/app/ui/book/read/page/ContentView.kt

@ -17,6 +17,7 @@ import io.legado.app.utils.*
import kotlinx.android.synthetic.main.view_book_page.view.*
import org.jetbrains.anko.matchParent
import org.jetbrains.anko.sdk27.listeners.onScrollChange
import java.io.File
import java.util.*
@ -83,11 +84,14 @@ class ContentView : FrameLayout {
}
context.getPrefString(PreferKey.readBookFont)?.let {
if (it.isNotEmpty()) {
val file = File(it)
if (file.exists()) {
content_text_view.typeface = Typeface.createFromFile(it)
} else {
content_text_view.typeface = Typeface.DEFAULT
return@let
}
}
content_text_view.typeface = Typeface.DEFAULT
}
}
fun setBg(bg: Drawable?) {

Loading…
Cancel
Save