Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Big text in Android

I am trying to resize text in android to make it bigger using;

Paint paint = new Paint();
paint.setTextSize(30);
canvas.drawText("Text goes here" , x, y,paint);

However the text gets pixelated.

Is there any other way of resizing text in android without it being ugly and pixelated?

like image 363
Petter Avatar asked Jan 14 '11 11:01

Petter


1 Answers

Have you tried Paint.setAntiAlias(true) to turn on anti-aliasing? Paint.setSubpixelText(true) might also help.

http://developer.android.com/reference/android/graphics/Paint.html

like image 84
antonyt Avatar answered Sep 18 '22 17:09

antonyt