How can i fill an outlined font?

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

How can i fill an outlined font?

Postby keianhzo » Mon Dec 07, 2009 2:59 pm

Hi everybody,

I'm trying to use a Helvetica outlined ttf and i want the background of the font to be yellow and the outline part be black. I'm doing it loading the font in a TypeFace from assets and applying it to a TextView in the following way:

mTextViewMessage.setTypeface(myTypeFace);
mTextViewMessage.getPaint().bgColor = Color.YELLOW;
mTextViewMessage.setTextColor(Color.BLACK);
mTextViewMessage.setTextSize(26);
mTextViewMessage.setText(message);

but it does not work, the font is drawn with the black outline but no yellow background. In fact I am not even sure what does the bgColor field from TextPaint is for, i haven't found information about it in the doc. I've also tried to use the setBackgroundColor(Color) method from TextView but it doesn't fill the font inner part but all the TextView space.

So is there any way of doing it?.

Thanks for your help.
keianhzo
Freshman
Freshman
 
Posts: 3
Joined: Sun Nov 01, 2009 2:07 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 1 guest