On Oct 23, 11:04 am, Mark Murphy <[email protected]> wrote: > Keith Wiley wrote: > > Without specifying a custom font, does the default Android font simply > > not support italic? It seems to support all other settings provided by > > the Typeface class: serif, bold, monospace, etc., but italic and > > italic-bold don't work. The former appears normal and the latter > > appears bold. I'm surprised that it supports things like serif and > > monospace, but not something as obvious at italic, which is in some > > sense a simpler concept. > > > I'm sure I'm missing something obvious here. > > Got a snippet of XML that isn't working for you?
> Android App Developer Books:http://commonsware.com/books No XML. That's my point, this is all code-based text painting. Something like the following: I can create normal, bold, monospace, and serif text, but I can't create italic text. It always looks normal (or in the case of bold- italic, it looks bold). In addition, I am unsure what settings to use to indicate italic serif or italic monospace (there is a setting for italic-bold, although it just appears bold). I am referring to examples of the following sort: //This will appear normal paint.setTypeface(Typeface.DEFAULT); canvas.drawText("foo", 10, 10, paint); //This will appear bold paint.setTypeface(Typeface.DEFAULT_BOLD); canvas.drawText("foo", 10, 10, paint); //This will appear monospace paint.setTypeface(Typeface.MONOSPACE); canvas.drawText("foo", 10, 10, paint); //This will appear normal (identical to first example) paint.setTypeface(Typeface.SANS_SERIF); canvas.drawText("foo", 10, 10, paint); //This will appear serif paint.setTypeface(Typeface.SERIF); canvas.drawText("foo", 10, 10, paint); //This will appear normal paint.setTypeface(Typeface.defaultFromStyle(Typeface.NORMAL)); canvas.drawText("foo", 10, 10, paint); //This will appear bold paint.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD)); canvas.drawText("foo", 10, 10, paint); //This will appear normal (identical to first example) <=== THE PROBLEM BEING DESCRIBED paint.setTypeface(Typeface.defaultFromStyle(Typeface.ITALIC)); canvas.drawText("foo", 10, 10, paint); //This will appear bold (identical to straight-up bold) <=== THE PROBLEM BEING DESCRIBED paint.setTypeface(Typeface.Typeface.defaultFromStyle (Typeface.BOLD_ITALIC)); canvas.drawText("foo", 10, 10, paint); --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

