{ "id": "111226", "key": "TIMOB-13074", "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": null, "resolutiondate": null, "created": "2013-03-14T22:24:05.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "alloy", "font", "fontfamily", "mobile", "tss", "ttf" ], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:20.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "We're trying to use multiple variations of the same font in a Titanium Mobile iPad application. I've attached the fonts to this issue. Specifically, we're trying to use \"Open Sans\" and \"Open Sans Light\". We're able to successfully reference both fonts in our app, but both render as \"Open Sans Light\" and we're unable to get our app to use \"Open Sans\". \r\n\r\nHere's our XML code our Alloy view:\r\n\r\n{code}\r\n\r\n\t\r\n\t\t\r\n\t\t\r\n\r\n{code}\r\n\r\n.. and here's our TSS code:\r\n\r\n{code}\r\n\".logo\": {\r\n\ttop: 322,\r\n\tleft: 74,\r\n\twidth: 342,\r\n\theight: 65\r\n},\r\n\r\n\".revolutionize\": {\r\n\ttop: 405,\r\n\tleft: 73,\r\n\tfont: {fontFamily: \"Open Sans Light\", fontSize: \"26\"},\r\n\tcolor: \"#ffffff\"\r\n},\r\n\r\n\".yourName\": {\r\n\ttop: 251,\r\n\tleft: 566,\r\n\tfont: {fontFamily: \"Open Sans\", fontSize: \"17\"},\r\n\tcolor: \"#a1a1a1\"\r\n},\r\n\r\n\".yourNameText\": {\r\n\ttop: 279,\r\n\tleft: 566,\r\n\twidth: 364,\r\n\theight: 45\r\n}\r\n{code}", "attachment": [ { "id": "36318", "filename": "OpenSans_TTF.zip", "author": { "name": "shawncberg", "key": "shawncberg", "displayName": "Shawn Berg", "active": true, "timeZone": "America/New_York" }, "created": "2013-03-14T22:24:05.000+0000", "size": 1143744, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS: Unable to reference multiple variations of same font", "creator": { "name": "shawncberg", "key": "shawncberg", "displayName": "Shawn Berg", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "shawncberg", "key": "shawncberg", "displayName": "Shawn Berg", "active": true, "timeZone": "America/New_York" }, "environment": "Titanium Studio 3.0.2, Titanium SDK 3.0.2GA, iOS (iPad), Mac OSX 10.8.2", "comment": { "comments": [ { "id": "242370", "author": { "name": "shawncberg", "key": "shawncberg", "displayName": "Shawn Berg", "active": true, "timeZone": "America/New_York" }, "body": "I never was able to solve this using the font as it was named initially, but following the answer to [this post|http://stackoverflow.com/questions/6738929/custom-fonts-not-displaying-correctly-on-ios] I was able to use Font Forge to rename the fonts and successfully use both variations in my Titanium iPad app. Hope this helps someone else! I'm not sure if this bug is an iOS issue or a Titanium issue, though.", "updateAuthor": { "name": "shawncberg", "key": "shawncberg", "displayName": "Shawn Berg", "active": true, "timeZone": "America/New_York" }, "created": "2013-03-15T01:21:40.000+0000", "updated": "2013-03-15T01:21:40.000+0000" }, { "id": "242376", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "While the example is in alloy, this appears to be a platform-level issue as everything here worked fine when Shawn converted his OTF font to TTF. I'm guessing the focus should remain on the problem being with OTF fonts, not all fonts in general.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-15T01:39:02.000+0000", "updated": "2013-03-15T01:39:02.000+0000" }, { "id": "242385", "author": { "name": "shawncberg", "key": "shawncberg", "displayName": "Shawn Berg", "active": true, "timeZone": "America/New_York" }, "body": "Converting from OTF to TTF didn't solve the problem. I had the exact same issue with the TTF fonts. What solved the problem was using a font editing utility (Font Forge, in my case) to rename the Light and Regular versions of the font to trick Titanium/iOS to think they were different fonts in different font families. This allowed me to reference both fonts in my Titanium Mobile iPad app using the new names I assigned to them.", "updateAuthor": { "name": "shawncberg", "key": "shawncberg", "displayName": "Shawn Berg", "active": true, "timeZone": "America/New_York" }, "created": "2013-03-15T02:14:15.000+0000", "updated": "2013-03-15T02:14:15.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }