Titanium JIRA Archive
Appcelerator Community (AC)

[AC-898] Custom fonts not working on iOS with Titanium SDK 3.5.0

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNot Our Bug
Resolution Date2015-01-28T01:25:16.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsfont, fontfamily
ReporterDavid Fox
AssigneeShuo Liang
Created2015-01-26T04:46:32.000+0000
Updated2016-03-08T07:37:12.000+0000

Description

When trying to use a custom font in a standard non-Alloy project, it does not work on iOS when building with the 3.5.0 SDK. Switching to 3.4.1 makes it work without any changes to the code or project structure. On 3.5.0, the custom font works on Android but not iOS. Tested on iOS simulator targeting iOS 8.1.

Comments

  1. Shuo Liang 2015-01-26

    Hi, Please provide the simple test case to reproduce your problem. That will be really helpful to address the issue. Thanks. Regards, Shuo
  2. David Fox 2015-01-28

    Hi Shuo, In producing the test case, I've narrowed down the scope of the issue significantly. I don't think it is due to 3.5.0, but rather just when you add the font. Note: I'm using the latest version of Titanium Studio. The issue only occurs if you add the font after you've already created a build. For example, if I created a new project, add the custom font in, and then launch in the simulator, the custom font works fine. However, if I create a new project, test it in the simulator, go back and add a custom font in, and re-test, then the font does not work. But, if I delete the build folder and re-launch in the simulator, the font shows up. Here is a sample project that I think should show the issue:https://www.dropbox.com/s/as7sh1p59qicp2q/CustomFontsBroken.zip?dl=0 I left the build folder in there because I think it needs to be there for it to happen. If you launch the project and don't see the comic font in the simulator, then delete the build folder, re-launch, and it should show up now. If the custom font is showing up when you launch the project, then delete the font, delete the build directory, and re-launch the simulator. Then stop the simulator, add the font back in, re-launch the simulator, and the custom font will not show up. Please let me know if you have any questions. Regards, ~David
  3. Shuo Liang 2015-01-28

    HI, This is expect behave in Titanium as build folder will impart the whole project. If you make some change which may related to build folder, we will suggest you always clean the project before the next build and run. Regards, Shuo
  4. David Fox 2015-01-28

    OK, thanks. In that case, I think it would make sense to add that to the custom font documentation as a note. It's very confusing to newcomers otherwise as you can follow all the steps and still have it not work.
  5. Shuo Liang 2015-01-28

    We will notice that to out doc team, thank you very much for you ticket.

JSON Source