Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18968] Android: Custom fonts not working

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionCannot Reproduce
Resolution Date2019-08-13T21:30:38.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, regression
ReporterYissachar Radcliffe
AssigneeUnknown
Created2015-05-29T16:23:22.000+0000
Updated2019-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

FileDateSize
iOS Simulator Screen Shot Jun 1, 2015, 12.59.35 PM.png2015-06-01T07:03:28.000+000037689
Screen Shot 2015-06-01 at 12.59.56 PM.png2015-06-01T07:03:28.000+000042785

Comments

  1. kosso 2015-06-15

    Where are you putting your font file? Try: /Resources/android/fonts/yourfont.ttf (ie: within the 'android' folder).
  2. Yissachar Radcliffe 2015-06-15

    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.
  3. kosso 2015-06-15

    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
  4. Yissachar Radcliffe 2015-06-15

    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.
  5. Ashraf Abu 2015-06-16

  6. Ingo Muschenetz 2015-07-20

    Does this work in 4.0?
  7. Yissachar Radcliffe 2015-07-20

    It does not work in 4.0.0 for me.
  8. Alan Hutton 2019-08-13

    Unable to reproduce with 8.0.2.GA SDK.

JSON Source