in platf-android/src/androidMain/kotlin/org/jetbrains/letsPlot/android/canvas/AndroidContext2d.kt [139:157]
override fun setFont(f: Font) {
val style = when (f.fontStyle) {
FontStyle.NORMAL -> when (f.fontWeight) {
FontWeight.NORMAL -> Typeface.NORMAL
FontWeight.BOLD -> Typeface.BOLD
}
FontStyle.ITALIC -> when (f.fontWeight) {
FontWeight.NORMAL -> Typeface.ITALIC
FontWeight.BOLD -> Typeface.BOLD_ITALIC
}
}
val typeface = Typeface.create(f.fontFamily, style)
fillPaint.typeface = typeface
strokePaint.typeface = typeface
fillPaint.textSize = f.fontSize.toFloat()
strokePaint.textSize = f.fontSize.toFloat()
}