Reputation: 1317
I am trying to use custom font on my appcelerator android app but it's not working. Here is my code.
File name = DroidNaskhRegular.ttf
Path = app/assets/android/fonts/DroidNaskhRegular.ttf
// index.tss
"#headertitle":{
color: "white",
font:{
fontFamily: "DroidNaskhRegular"
}
}
Upvotes: 0
Views: 293
Reputation: 5680
You could also double check the font name within the TTF itself. I know that iOS and Android treat this differently... in my own app, I updated the TTF to have the same file and font name. You could try opening up the TTF on your computer, see the name (possibly Droid Arabic Naskh
) and try that as the fontFamily
instead.
I'm not using Alloy, so my fonts are located in Resources/iphone/fonts/Whatever.ttf
and Resources/android/fonts/Whatever.ttf
. I reference them as font: { fontFamily: 'Whatever' }
.
Upvotes: 0
Reputation: 3539
Path should be this:
app/assets/fonts/DroidNaskhRegular.ttf
just move the fonts folder out of android.
Upvotes: 1