I raised this on the forums a little while ago and found out it isn't supported in 1.0. Seeing your post reminded me that I didn't subsequently file an RFE, so I just wrote this:
http://code.google.com/p/android/issues/detail?id=1087 It lists some possible workarounds that you might find useful. My proposal is probably a big change, but wouldn't (I think) cause any backward incompatibility with the 1.0 release. Tom. 2008/10/27 PAS <[EMAIL PROTECTED]> > > Hey developers, > > I have a TTF in my assets/fonts directory I can use in TextViews from > within code following the API example. That is great for one-offs, but > what I really want to do is to use this font in a style, and the > reference that style from a layout. > > Broken example: > <!-- styles.xml --> > <?xml version="1.0" encoding="utf-8"?> > <resources> > <style name="Title"> > <item name="android:textSize">24sp</item> > <item name="android:typeface">fonts/myfont.ttf</item> > </style> > </resources> > > <!-- layout.xml --> > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ > android" > android:orientation="vertical" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > > > <TextView android:id="@+id/title" > style="@style/Title" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > /> > </LinearLayout> > > > This would allow me to reuse the same style (including font) without > having to do it in code. Anyone have any ideas how to make this work? > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

