Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16517] MobileWeb: Button "font" property not working

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2014-03-31T22:32:21.000+0000
Affected Version/sRelease 3.2.1
Fix Version/s2014 Sprint 07, 2014 Sprint 07 Tooling, Release 3.3.0
ComponentsMobileWeb
Labelsregression, supportTeam, triage
ReporterCarolina Lopez
AssigneeChris Barber
Created2014-02-25T16:58:52.000+0000
Updated2014-06-19T12:43:10.000+0000

Description

In Mobile Web "font" property of Ti.UI.Button isn't working properly. Code below shows how a Label and a Button are being placed in the screen and both of their "font" properties are being set; Label font property works well, but Button's font never gets changed. *View:*

Attachments

FileDateSize
TIMOB-16517_Screenshoot.jpg2014-03-20T20:10:57.000+000065633
TIMOB-16517_TestCase.zip2014-03-20T20:10:57.000+00003612876

Comments

  1. Ritu Agrawal 2014-02-28

    Moving this ticket to engineering as I can reproduce the issue with following Titanium test:
       var win = Ti.UI.createWindow({
         backgroundColor: 'white'
       });
       
       var button = Titanium.UI.createButton({
          title: 'Hello',
          top: 10,
          width: 100,
          height: 100,
          font: { fontFamily: "Helvetica-Light", fontSize: 40}  
       });
       
       button.addEventListener('click',function(e)
       {
          Titanium.API.info("You clicked the button");
       });
       
       win.add(button);
       win.open();
       
  2. Chris Barber 2014-03-12

    It's probably "not working" because the browser does not support "Helvetica-Light". If you drop a ttf, otf, or woff formatted version of the "Helvetica-Light" font file in the Resources/fonts folder, it should work. Do not drop in multiple file format versions due to a bug that has been fixed in master and won't be released until 3.3.0.
  3. Eduardo Gomez 2014-03-20

    Thanks for provide another way for approaching the issue. Unfortunately, isn't reliably working for me. I've uploaded a screen shoot and test case to demonstrate this. Does the 3.3.0 fix will also fix the ability to change button's font style? If I can help on any way, let me know.
  4. Chris Barber 2014-03-31

  5. Chris Barber 2014-03-31

    Dupe of TIMOB-16535
  6. Deepti Pandey 2014-05-09

    Closing this duplicate issue as Helvetica-Light font is not supported by browser. Verified with : Mac :10.9.2 Appcelerator Studio, build: 3.3.0.201405080918 SDK - 3.3.0.v20140508135704 acs-1.0.14 alloy-1.4.0-dev npm-1.3.2 titanium-3.3.0-dev titanium-code-processor-1.1.1 Xcode :5.1.1

JSON Source