I am trying to place white text at the bottom of a bitmap. Additionally, I would like to center the text horizontally, but that's optional.

```
val canvas = Canvas(bitmap)
val paint = Paint()
paint.color = Color.WHITE
paint.textSize = 50f
canvas.drawText("Meme Text", 30f, bitmap.height - 50f, paint)

```

I assumed that because I set the y value of the text to `bitmap.height - 50`, the text would align with the bottom of the bitmap (since `textSize` is `50f`)

However, in reality, the text does not appear at the bottom of the image. How can I fix this?

Here is the corresponding Java code: 

```
Bitmap bitmap = ... // Load your bitmap here
Canvas canvas = new Canvas(bitmap);
Paint paint = new Paint(); 
paint.setColor(Color.BLACK); 
paint.setTextSize(10); 
canvas.drawText("Some Text here", x, y, paint);

```

Update: I tried and that helped a small amount. 

```
    val metrics = context.resources.displayMetrics

    canvas.drawText("Meme Text", 30f,canvas.height
            - paint.textSize/metrics.density, paint)

```