[TIMOB-18968] Android: Custom fonts not working
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2019-08-13T21:30:38.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | android, regression |
Reporter | Yissachar Radcliffe |
Assignee | Unknown |
Created | 2015-05-29T16:23:22.000+0000 |
Updated | 2019-08-13T21:30:38.000+0000 |
Description
Android custom font support appears to be broken in Titanium 4.x
Following the guide found on the wiki https://wiki.appcelerator.org/display/guides2/Custom+Fonts results in proper custom fonts when using SDK 3.5.1.GA on Android, but no visible custom fonts on SDK 4.1.0. iOS custom fonts work properly.
You can easily test this by downloading the CustomFonts example application on the wiki page and changing the SDK version.
Attachments
File | Date | Size |
---|---|---|
iOS Simulator Screen Shot Jun 1, 2015, 12.59.35 PM.png | 2015-06-01T07:03:28.000+0000 | 37689 |
Screen Shot 2015-06-01 at 12.59.56 PM.png | 2015-06-01T07:03:28.000+0000 | 42785 |
Where are you putting your font file? Try: /Resources/android/fonts/yourfont.ttf (ie: within the 'android' folder).
The CustomFonts example app is Alloy so the fonts are in /assets/android/fonts. I've also tried non-alloy versions with the fonts in /Resources/fonts and /Resources/android fonts, but neither of those attempts changed anything.
Are you using the correct font name in fontFamily? You use a different name than with iOS. I think these instructions might be the same as on the Wiki : http://docs.appcelerator.com/platform/latest/#!/guide/Custom_Fonts
Yes, I am using the correct font name. As mentioned, you can see everything that's going on the CustomFonts app linked above. It is a really simple app that just displays a line of custom text, so you can easily determine that everything is done correctly. Again, this works exactly as expected on TiSDK 3.5.1 so it seems to be something broken with 4.x as opposed to user error.
Does this work in 4.0?
It does not work in 4.0.0 for me.
Unable to reproduce with 8.0.2.GA SDK.