Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

android fonts - how to render multiple fonts from same family

$
0
0

For font declarations, iOS wants the postscript name. Android wants the font family name. If I want to use four fonts that all originate from the same family, how does the android app know the difference?

For example, I have in my Alloy.Globals.fonts declaration

fonts : {
    heavy : (OS_ANDROID) ? 'Helvetica Neue LT Std' : 'HelveticaNeueLTStd-Hv',
    medium: (OS_ANDROID) ? 'Helvetica Neue LT Std' : 'HelveticaNeueLTStd-Md',
    light : (OS_ANDROID) ? 'Helvetica Neue LT Std' : 'HelveticaNeueLTStd-Lt',
    italics : (OS_ANDROID) ? 'Helvetica Neue LT Std' : 'HelveticaNeueLTStd-It',
},
None of these font subtypes -- heavy, medium, light, or italics -- render correctly on android. I have the actual font files in the /assets/fonts folder, so they get embedded with the app. I grabbed the names straight from the font information itself (as defined in the appc wiki).

Am I missing something? I doubt that this issue is unique to me. So, I'm hoping someone else has successfully resolved this issue already.


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>