{ "id": "124183", "key": "TIMOB-16120", "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": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2014-02-02T23:07:13.000+0000", "created": "2013-12-25T16:23:54.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "SDK3.2.0", "labels" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-02-02T23:07:13.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": "The text of a label using a custom font (Helvetica Neue LT Std) is cut off in iOS 7.\r\n\r\nIn 3.1.4, I had to add extra height to the label to prevent the clipping. In 3.2.0, on iOS 6, the label looks correct.\r\n\r\nin 3.2.0, on iOS 7.0.1 simulator the text is clipped even if the height of the label is greater than the total height of th text.\r\n\r\nThe first attached image shows the text on the simulator iOS 6.0.1, the second on the simulator iOS 7.0.3\r\n\r\n{code}\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\n \r\nvar test_label = Ti.UI.createLabel({\r\n text : \"ABCDEFGHILMNOPQRSTUVZ\",\r\n font : {\r\n fontFamily : 'Helvetica Neue LT Std',\r\n fontSize : 36\r\n },\r\n textAlign : 'left',\r\n height : 50,\r\n borderColor : 'blue'\r\n});\r\n \r\nwin1.add(test_label);\r\n \r\nwin1.open();\r\n{code}", "attachment": [ { "id": "45408", "filename": "2014-01-27_1345.png", "author": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-27T21:49:30.000+0000", "size": 70688, "mimeType": "image/png" }, { "id": "45407", "filename": "2014-01-27_1346.png", "author": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-27T21:49:30.000+0000", "size": 70466, "mimeType": "image/png" }, { "id": "44867", "filename": "app.zip", "author": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-30T18:28:17.000+0000", "size": 7331867, "mimeType": "application/zip" }, { "id": "45409", "filename": "font_projects_both.zip", "author": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-27T21:49:30.000+0000", "size": 4796907, "mimeType": "application/zip" }, { "id": "44805", "filename": "iOS 6.0.1 simulator.png", "author": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "created": "2013-12-25T16:23:54.000+0000", "size": 14905, "mimeType": "image/png" }, { "id": "44806", "filename": "iOS 7.0.3 simulator.png", "author": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "created": "2013-12-25T16:23:54.000+0000", "size": 14601, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Label with custom font cut off", "creator": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "subtasks": [], "reporter": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "environment": "Titanium Studio, build: 3.2.0.201312191547 , SDK 3.2.0 GA , Apple SDK 6.1 and 7.0.3 , xCode 5.0.2", "comment": { "comments": [ { "id": "285786", "author": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "body": "simple code test\r\n\r\n{code} \r\nvar test_label = Ti.UI.createLabel({\r\n text : \"ABCDEFGHILMNOPQRSTUVZ\",\r\n font : {\r\n fontFamily : 'Helvetica Neue LT Std',\r\n fontSize : 36\r\n },\r\n textAlign : 'left',\r\n left : 500,\r\n height : 50,\r\n borderColor : 'blue'\r\n});\r\n{code} \r\n\r\nwith this [custom font|https://www.dropbox.com/s/fhfgmyy59rii448/font.otf]", "updateAuthor": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "created": "2013-12-25T16:27:58.000+0000", "updated": "2013-12-25T16:29:15.000+0000" }, { "id": "286018", "author": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "body": "nothing ... ?", "updateAuthor": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "created": "2013-12-27T23:06:40.000+0000", "updated": "2013-12-27T23:06:40.000+0000" }, { "id": "286020", "author": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "updateAuthor": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "created": "2013-12-27T23:35:50.000+0000", "updated": "2013-12-27T23:36:02.000+0000" }, { "id": "286035", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Nicolo. We appreciate your tickets. Since we like you, I'd like to help you get better service.\n\n# This issue was filed on Christmas Day using the community support channel. You cannot expect immediate support.\n# Your tickets can be complicated and confusing. We read them in our triage meetings and have to skip them and come back later.\n\nSome suggestions:\n\n# Give us a simple example that works. We had to correct your test case.\n# Describe in very simple terms what is broken. Pictures help show the difference (which you provided). But from what I understand, it appears that we fixed things on iOS6, but it's broken on iOS 7. If that's the case, say that this is broken on iOS 7.\n\nI've edited your ticket to illustrate my understanding. Please let me know if you agree.\n\nPlease try using the latest version of the SDK from the 3.1.X CI builds. This should work for you.\n\n", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-28T00:15:51.000+0000", "updated": "2013-12-28T00:15:51.000+0000" }, { "id": "286037", "author": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "body": "I do not expect them absolutely a reply on Christmas Day, in fact thank you for the help you offer to us developers. \nto clarify the problem I can tell you this: using the SDK 3.1.4 on with apple SDK 6 and 7 I had no problem with the use of custom fonts, enough to increase the height of the label and the text contained in it was not cut\n\nnow with the SDK 3.2.0 this has changed. now on iOS 6 the text is not cut but the height of the label is larger than the set, while on iOS 7 the text is cut", "updateAuthor": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "created": "2013-12-28T00:30:39.000+0000", "updated": "2013-12-28T00:30:39.000+0000" }, { "id": "286060", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Did you try the latest 3.1.X branch?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-28T04:45:01.000+0000", "updated": "2013-12-28T04:45:01.000+0000" }, { "id": "286126", "author": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "body": "now try this : 3.1.4.v20131213162008", "updateAuthor": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "created": "2013-12-28T12:59:05.000+0000", "updated": "2013-12-28T12:59:05.000+0000" }, { "id": "286127", "author": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "body": "with this SDK (3.1.4.v20131213162008) i have this error\n\n{code}\n[ERROR] : ** BUILD FAILED **\n[ERROR] : The following build commands failed:\n[ERROR] : \tLd build/Debug-iphonesimulator/Ottica\\ Artioli.app/Ottica\\ Artioli normal i386\n[ERROR] : (1 failure)\n{code}", "updateAuthor": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "created": "2013-12-28T13:09:45.000+0000", "updated": "2013-12-28T13:09:45.000+0000" }, { "id": "286270", "author": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have attached a sample app with font that clips when built with the 3.2.0.GA SDK and iOS 7.0.3 for the 7.0.3 Simulator but the same configuration built for the 6.1 simulator does not clip.", "updateAuthor": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-30T18:28:17.000+0000", "updated": "2013-12-30T18:28:17.000+0000" }, { "id": "286295", "author": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "body": "Yes, but your test was developed with Alloy", "updateAuthor": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "created": "2013-12-30T19:53:03.000+0000", "updated": "2013-12-30T19:53:03.000+0000" }, { "id": "286451", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this ticket to engineering as Alan can reproduce the issue with the attached project with iOS 7.0.3 simulator but not with iOS 6 simulator.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-02T07:26:42.000+0000", "updated": "2014-01-02T07:26:42.000+0000" }, { "id": "288990", "author": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "body": "there are no updates ?", "updateAuthor": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "created": "2014-01-21T07:46:42.000+0000", "updated": "2014-01-21T07:46:42.000+0000" }, { "id": "289003", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This appears to be a known Apple issue with iOS 7, custom fonts, and labels. There are a number of Stack Overflow posts on the subject.\n\nI've found two possible fixes to the problem, detailed here: http://stackoverflow.com/questions/19036051/ios-7-custom-fonts-alignment. Can you please try the following:\n\n\"To edit these \\[heights\\] in the font you will need to download the [Apple Font Tool Suite|http://developer.apple.com/fonts/]. Once you’ve installed this you need to open Terminal and navigate to the directory that contains your font. After that enter the following command:\n\n{code}\nftxdumperfuser -t hhea -A d font.ttf\n{code}\n\nThis will create a file called font.hhea.xml, open this new file into a text editor and adjust the values for ascender and descender. Generally if you font sits too low you want to decrease ascender and increase descender. After editing and saving enter the following command into terminal to reconstruct your Font file:\n\n{code}\nftxdumperfuser -t hhea -A f font.ttf\n{code}\n\nYou can now use the font.ttf file in your application. If the font still isn’t right just repeat the above procedure until you are happy.\"\n\nIf that appears to be too much work, people have also suggested you can use the \"Glyphs\" application to re-export the font.\n\nCan you please try the solution above and let us know if it addresses the issue?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-21T10:27:55.000+0000", "updated": "2014-01-21T10:27:55.000+0000" }, { "id": "289004", "author": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "body": "1) thank you very much for your answer, always very friendly and helpful \r\n\r\n2) (since we do not have available until tonight my mac development, I tried the solution of using Glyphs). \r\n- I imported the font.otf, and then I exported it.\r\n- Opening the two fonts (the original and the exported with glyphs) with font viewer of Mac and the situation seems to be already improved! \r\n\r\nThe spaces seem to be already decreased.\r\n\r\nI will update you immediately after i can run the test on the app! \r\n\r\nscreen attached (left the original font, right the exported with glyphs)\r\nhttps://www.dropbox.com/s/r530cs1hz2zlzmx/Schermata%202014-01-21%20alle%2011.44.28.png", "updateAuthor": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "created": "2014-01-21T10:44:46.000+0000", "updated": "2014-01-21T10:46:02.000+0000" }, { "id": "289089", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "additional info : http://www.andyyardley.com/2012/04/24/custom-ios-fonts-and-how-to-fix-the-vertical-position-problem/", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-21T19:22:14.000+0000", "updated": "2014-01-21T19:22:14.000+0000" }, { "id": "289141", "author": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "body": "I managed to do a test on the app finally, and I solved the problem by exporting the font with Glyphs", "updateAuthor": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "created": "2014-01-21T22:44:41.000+0000", "updated": "2014-01-21T22:44:41.000+0000" }, { "id": "289862", "author": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The attached files show that the same font in a native iOS project are not clipped but in a titanium project are clipped.", "updateAuthor": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-27T21:49:30.000+0000", "updated": "2014-01-27T21:49:30.000+0000" }, { "id": "289864", "author": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "body": "See attached files that demonstrate the same font is not clipped in a native iOS project but is clipped in a titanium project.", "updateAuthor": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-27T21:50:28.000+0000", "updated": "2014-01-27T21:50:28.000+0000" }, { "id": "289865", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~aleard] Did you attempt to adjust the font using the tools mentioned above?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-27T21:53:16.000+0000", "updated": "2014-01-27T21:53:16.000+0000" }, { "id": "289870", "author": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Sorry, they said they had already run it on the font they sent. I just adjusted it and was able to fix the issue.", "updateAuthor": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-27T22:15:19.000+0000", "updated": "2014-01-27T22:15:19.000+0000" }, { "id": "290811", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing in correct status.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-02T23:07:13.000+0000", "updated": "2014-02-02T23:07:13.000+0000" } ], "maxResults": 22, "total": 22, "startAt": 0 } } }