0

How to get these funky text effects on an android canvas

I want to get these photo effects in my Livewallpaper.I searched through but it was no match.

Swapnil Gondkar
  • 345
  • 1
  • 4
  • 12

1 Answers1

1

You can draw text with a custom font like this example.

Paint paint = new Paint();
paint.setColor(Color.GREEN);
paint.setTextSize(40);
Typeface chops = Typeface.createFromAsset(getAssets(), "ChopinScript.ttf");
paint.setTypeface(chops);
float text_x = 120;
float text_y = 120;
canvas.drawText("Hello", text_x, text_y, paint);

And then you can add effects to it like these stackoverflow questions here and here.

Community
  • 1
  • 1
Steven Trigg
  • 1,903
  • 2
  • 19
  • 22
  • A neat and clean answer, but I need to ask is this the only resort ? Because I had thought about it initially but was confused with some effects like gradients like in the image shown above(2nd last row last column) so I will have to combine these effects http://stackoverflow.com/questions/16958111/how-to-set-gradient-as-the-text-color-of-a-textview – Swapnil Gondkar Jan 10 '14 at 05:05