// Kotlin language
val fm = paint.fontMetrics
val lineHeight = fm.bottom - fm.top + fm.leading
mText.split("
").forEachIndexed { idx, line ->
val baseline = idx * lineHeight + (-fm.top) // fm.top is negative
canvas.drawText(line, 0f, baseline, paint)
}