and this is how I use the typeface :

TextView title = new TextView(this.getApplicationContext());
title.setText("some text");
title.setTypeface(Typeface.create(Typeface.SANS_SERIF,
Typeface.BOLD_ITALIC));

On Sep 16, 3:29 pm, Christophe <[email protected]>
wrote:
> hello everybody,
>
> I've got 2 problems with the Typeface.create(...) method :
>
> - the javadoc for this methods say : "Create a typeface object given a
> family name, and option style information. If null is passed for the
> name, then the default font will be chosen". However if I use for
> example : Typeface.create(null, Typeface.ITALIC), it does not compile,
> with the following error : "The method create(String, int) is
> ambiguous for the type Typeface". This is because there is 2 different
> methods : create(String, int) and create(Typeface, int). I guess there
> is a problem with the API here :(
>
> - italic does not work with sans serif. For example if I use
> Typeface.create(Typeface.SANS_SERIF, Typeface.ITALIC), the text will
> not be in italic. Bold works fine. Serif works fine with both bold and
> italic.
>
> regards,
> Christophe

-- 
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

Reply via email to