{ "id": "120479", "key": "TIMOB-15349", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2013-09-27T13:21:54.000+0000", "created": "2013-09-26T12:33:31.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "height", "iOS7", "label", "triage" ], "versions": [ { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" } ], "issuelinks": [ { "id": "32176", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "120520", "key": "TIMOB-15359", "fields": { "summary": "iOS7: some custom fonts are rendered differently compared to iOS6", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T22:25:21.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Vertical label height decreases in iOS 7 specifically in alloy.\r\n\r\n*Steps to Reproduce* :\r\n\r\n1. Copy and paste the below code in newly created alloy project.\r\n\r\nindex.xml:\r\n{code}\r\n\r\n\t\r\n\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\nindex.tss:\r\n{code}\r\n\"container\" : {\r\n layout: \"vertical\",\r\n width: Ti.UI.FILL,\r\n height: Ti.UI.SIZE\r\n},\r\n\r\n\"#countdownMainValue\" : {\r\n height: Ti.UI.SIZE, \r\n top: 0,\r\n font: {\r\n fontFamily: \"ProximaNovaSoft-Regular\",\r\n fontSize:\"150dp\"\r\n },\r\n color: \"#119ca6\",\r\n },\r\n\"#countdownMainLabel[platform=ios]\" : {\r\n font: {\r\n fontFamily: \"ProximaNovaSoft-Regular\",\r\n fontSize:\"24dp\"\r\n },\r\n color: \"#119ca6\",\r\n top: \"-50dp\",\r\n}\r\n{code}\r\n\r\n2. Run on iOS 6 and iOS 7 device and see the difference.\r\n\r\n*Note:* This behavior is not shown in Classic Titanium. Please find attachments of iOS 6 and iOS 7. ", "attachment": [ { "id": "42780", "filename": "iOS 6.PNG", "author": { "name": "mpathak", "key": "mpathak", "displayName": "Meenakshi Pathak", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-26T12:33:31.000+0000", "size": 26743, "mimeType": "image/png" }, { "id": "42781", "filename": "iOS 7.png", "author": { "name": "mpathak", "key": "mpathak", "displayName": "Meenakshi Pathak", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-26T12:33:31.000+0000", "size": 25910, "mimeType": "image/png" } ], "flagged": false, "summary": "Alloy: label height decreases", "creator": { "name": "mpathak", "key": "mpathak", "displayName": "Meenakshi Pathak", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mpathak", "key": "mpathak", "displayName": "Meenakshi Pathak", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 3.1.3, iOS 6, iOS 7", "comment": { "comments": [ { "id": "272972", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~mpathak] can you include the traditional titanium code you used to compare? It seems pretty unlikely that this is an Alloy issue, but the code you used to assert this would make it much easier to identify. It also looks like, based on your screenshots, that you used 2 different ios sims to generate your screenshots. This would account for the difference in formatting. It's possible you used different sims for your traditional vs. alloy approach. Be sure to use the same sim for all tests.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-26T15:56:27.000+0000", "updated": "2013-09-26T15:58:29.000+0000" }, { "id": "272983", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~mpathak] you have a typo in your alloy code. Your style key should be {{.container}}, not {{container}}, in the index.tss. You're missing the dot, which signifies class. This causes the window to not get the appropriate properties, which in turn accounts for the disparity between your alloy and traditional code. When you fix that, the Alloy and traditional version look exactly the same, as in your 2nd screenshot. The formatting difference is a result of the changes in size and formatting imposed by Apple with iOS 7, not Titanium. As with all other iOS developers (not just Titanium ones), you'll unfortunately need to account for these formatting changes in your app.\r\n\r\nFor reference, here's the working Alloy and traditional versions\r\n\r\nh2. traditional\r\n\r\nh4. app.js\r\n\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n\tlayout: \"vertical\",\r\n width: Ti.UI.FILL,\r\n height: Ti.UI.SIZE\r\n});\r\n\r\nvar mainValue = Ti.UI.createLabel({\r\n\ttext: '00',\r\n\tborderColor: 'red',\r\n\theight: Ti.UI.SIZE,\r\n top: 0,\r\n font: {\r\n fontFamily: \"ProximaNovaSoft-Regular\",\r\n fontSize:\"150dp\"\r\n },\r\n color: \"#119ca6\"\r\n});\r\n\r\nvar mainLabel = Ti.UI.createLabel({\r\n\ttext: 'Days',\r\n\tfont: {\r\n fontFamily: \"ProximaNovaSoft-Regular\",\r\n fontSize:\"24dp\"\r\n },\r\n color: \"#119ca6\",\r\n top: \"-50dp\"\r\n});\r\n\r\nwin.add(mainValue);\r\nwin.add(mainLabel);\r\n\r\nwin.open();\r\n{code}\r\n\r\nh2. alloy\r\n\r\nUnchanged from your version, other than fixing your typo.\r\n\r\nh4. index.xml\r\n\r\n{code:xml}\r\n\r\n \r\n \r\n \r\n \r\n\r\n{code}\r\n\r\nh4. index.tss\r\n\r\n{code:javascript}\r\n\".container\" : {\r\n layout: \"vertical\",\r\n width: Ti.UI.FILL,\r\n height: Ti.UI.SIZE\r\n},\r\n\r\n\"#countdownMainValue\" : {\r\n height: Ti.UI.SIZE,\r\n top: 0,\r\n font: {\r\n fontFamily: \"ProximaNovaSoft-Regular\",\r\n fontSize:\"150dp\"\r\n },\r\n color: \"#119ca6\",\r\n },\r\n\"#countdownMainLabel[platform=ios]\" : {\r\n font: {\r\n fontFamily: \"ProximaNovaSoft-Regular\",\r\n fontSize:\"24dp\"\r\n },\r\n color: \"#119ca6\",\r\n top: \"-50dp\",\r\n}\r\n{code}\r\n\r\nh4. index.js\r\n\r\n{code:javascript}\r\n$.index.open();\r\n{code}", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-26T16:20:54.000+0000", "updated": "2013-09-26T16:22:15.000+0000" }, { "id": "273142", "author": { "name": "jsemple", "key": "jsemple", "displayName": "James Semple", "active": true, "timeZone": "Europe/London" }, "body": "Tony, to clarify here the issue is that the same Titanium label code behaves differently from iOS6 to iOS7. The difference is in the placement of the word 'Days' and we believe it is related to using a negative top value. I also do not believe this is related to Alloy however we need to push for this change in behaviour to at least be confirmed by Appcelerator. ", "updateAuthor": { "name": "jsemple", "key": "jsemple", "displayName": "James Semple", "active": true, "timeZone": "Europe/London" }, "created": "2013-09-27T10:41:02.000+0000", "updated": "2013-09-27T10:41:02.000+0000" }, { "id": "273145", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Marking as duplicate of linked issue.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-27T13:21:54.000+0000", "updated": "2013-09-27T13:21:54.000+0000" }, { "id": "415123", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate and links to the related ticket have been provided above.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T22:25:21.000+0000", "updated": "2017-03-22T22:25:21.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }