{ "id": "141277", "key": "TIMOB-18156", "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": [ { "id": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-04-13T02:59:17.000+0000", "created": "2014-12-09T08:27:21.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "font", "mobileweb" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" }, { "id": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" }, { "id": "16676", "description": "Release 3.4.1", "name": "Release 3.4.1", "archived": false, "released": true, "releaseDate": "2014-11-14" } ], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2015-06-05T22:43:17.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": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) Platform" } ], "description": "h4. Problem Description\r\nCustom fonts are not working on MobileWeb, But works well on Android and IOS.\r\n\r\nh4. Steps to reproduce\r\n1. Create new mobile project (classic titanium)\r\n2. Add this code:\r\n{code}\r\nvar win = Ti.UI.createWindow({ \r\nbackgroundColor: 'white', \r\nlayout: 'vertical', \r\ntitle: 'Label Demo' \r\n}); \r\n\r\nvar label1 = Ti.UI.createLabel({ \r\ncolor: '#900', \r\nfont: { fontFamily: \"ShadowsintoLight\", fontSize:48 }, \r\ntext: 'A simple label', \r\ntextAlign: Ti.UI.TEXT_ALIGNMENT_CENTER, \r\ntop: 30, \r\nwidth: Ti.UI.SIZE, height: Ti.UI.SIZE \r\n}); \r\n\r\nvar label2 = Ti.UI.createLabel({ \r\ncolor:'blue', \r\nfont: { \r\nfontFamily: \"ShadowsintoLight\", \r\nfontSize: 14 \r\n}, \r\ntext: 'A long label with\\na few line breaks\\nand unicode (UTF8)\\nsymbols such as\\na white chess piece \\u2655\\nand the euro symbol \\u20ac\\nlooks like this!\\n', \r\ntextAlign: Ti.UI.TEXT_ALIGNMENT_LEFT, \r\ntop: 30, \r\nwidth: 300, height: 200 \r\n}); \r\n\r\nwin.add(label1); \r\nwin.add(label2); \r\nwin.open(); \r\n{code}\r\n3. Create a fonts directory inside Resources\r\n4. copy the attached font to the fonts directory.\r\n5. Select 3.4.1.GA as the Mobile SDK \r\n6. Run in mobile web \r\n\r\nh4. Actual Results\r\nThe custom fonts are not show.\r\n\r\nh4. Expected results\r\nThe custom fonts should appear, as used to happen with Mobile SDK 3.2.3.\r\n\r\nh4. Extra info\r\nI tested this and the last known working version is Mobile SDK 3.2.3.GA\r\n", "attachment": [ { "id": "53118", "filename": "ShadowsIntoLight.ttf", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2014-12-09T08:27:21.000+0000", "size": 54304, "mimeType": "application/x-font-ttf" } ], "flagged": false, "summary": "MobileWeb: Custom fonts are not working", "creator": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "subtasks": [], "reporter": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "environment": "TI SDK 3.4.1, 3.4.0, 3.3.0. \r\nGoogle Chrome\r\nFirefox", "closedSprints": [ { "id": 370, "state": "closed", "name": "2015 Sprint 07 SDK", "startDate": "2015-03-28T00:00:13.362Z", "endDate": "2015-04-11T00:00:00.000Z", "completeDate": "2015-04-13T16:25:29.003Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "348501", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Master pull request: https://github.com/appcelerator/titanium_mobile/pull/6759\r\n4_0_X pull request: https://github.com/appcelerator/titanium_mobile/pull/6760\r\n\r\nTo test, create a Mobile Web app. Inside the \"Resources\" directory, create a \"fonts\" directory. Drop in a \"woff\" and \"ttf\" font. Give them the same filename. Set the fontFamily on a Ti.UI.Label and build!", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-04-03T21:33:07.000+0000", "updated": "2015-04-03T21:33:07.000+0000" }, { "id": "349255", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "PR merged.", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2015-04-13T02:59:33.000+0000", "updated": "2015-04-13T02:59:33.000+0000" }, { "id": "354477", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\n\r\nCustom fonts are displayed successfully on mobile web.\r\n\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 4.1.0.201505071004\r\nTi SDK : 4.1.0.v20150604094312\r\nCLI : 4.0.2-rc2\r\nAlloy : 1.6.0\r\nMAC Yosemite : 10.10.3\r\nAppc npm : 4.0.0\r\nAppc CLI : 4.0.1\r\nNode: v0.10.37\r\nNexus 5 - Android 5.1.1", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-06-05T22:43:12.000+0000", "updated": "2015-06-05T22:43:12.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }