3

the issue I face seems to have no solution and to be downright impossible to rectify, but I thought to ask here just in case I am missing something.

I need to display some text in an android widget using a non-system, non-standard font from assets folder.

Unfortunately, android does not allow extended view definitions in home screen widgets. Nor I can invoke a corresponding API method (setTypeface) from within the widget.

Does anyone know if there's any other alternative way to accomplish this? (It seems quite natural to be able to customise text view appearance not only in the app but in widgets too, but it turns out to be impossible).

I'd appreciate any help on this.

Thank you...

Nar Gar
  • 2,591
  • 2
  • 25
  • 28

1 Answers1

5

Have you seen this link yet?

What is needed is to render the font onto a canvas, and then pass it on to a bitmap and assign that to an imageview.

How to use a custom typeface in a widget?

By the way, you've asked 18 questions and have not accepted a single answer. I suggest you start accepting some or people will be less inclined to help you.

Community
  • 1
  • 1
Michael
  • 3,334
  • 20
  • 27
  • this is probably the way to go. Thanks for the idea. Btw, where do I click to accept an answer, I didn't know about that? Is it that tick mark to the left of the answer? – Nar Gar Oct 22 '12 at 22:41