{ "id": "62250", "key": "TIMOB-1618", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-01-27T23:46:09.000+0000", "created": "2011-04-15T02:57:29.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "parity", "tbs-1.8.2" ], "versions": [], "issuelinks": [ { "id": "55171", "type": { "id": "10122", "name": "Gantt: start-finish", "inward": "is triggered by", "outward": "is triggering" }, "outwardIssue": { "id": "168318", "key": "TIMOB-24801", "fields": { "summary": "Android: Ti.UI.Label.minimumFontSize property changes size randomly", "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": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } }, { "id": "53916", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "165266", "key": "TIMOB-24298", "fields": { "summary": "Android: Expose Ti.UI.TextField.minimumFontSize (Parity)", "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": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "14296", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "84076", "key": "TIDOC-33", "fields": { "summary": "APIDOC: mark UI label property minimumFontSize is iOS-only", "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": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-06-09T14:36:31.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}

\nhttps://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI...\nlists in properties:

\n
\nminimumFontSize     int\n\nthe minimum size of the font when the font is sized\nbased on the contents. Enables font scaling to fit\nand forces the label content to be limited to a single line\n
\n

This is extremely useful, however it appears to only be\nimplemented on iOS; the property is never even checked in the\nAndroid code.

{html}", "attachment": [ { "id": "61162", "filename": "Screen Shot 2016-12-30 at 21.04.59.png", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-12-30T20:06:35.000+0000", "size": 252675, "mimeType": "image/png" }, { "id": "61161", "filename": "Screen Shot 2016-12-30 at 21.05.38.png", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-12-30T20:06:34.000+0000", "size": 255767, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Expose Ti.UI.Label.minimumFontSize for Parity", "creator": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rpfeiffer", "key": "rpfeiffer", "displayName": "Ralf Pfeiffer", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "126198", "author": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Assigning tickets affecting StatusNet to our support contact per\nrequest.

\n

We have worked around this for the moment using a hack scaling\nbased on string length, but this obviously won't be very exact and\ncould fail due to variable font metrics, etc.

\n

Bug on StatusNet side: http://status.net/open-source/issues/2592

{html}", "updateAuthor": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:57:29.000+0000", "updated": "2011-04-15T02:57:29.000+0000" }, { "id": "126199", "author": { "name": "robby", "key": "robby", "displayName": "Robby", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Agreed that it's not a super crucial issue, but I'm using\nminimumFontSize for at least 20 labels that can have variable text.\nI did the hack as well on the 2 or 3 most important ones, but it's\ndefinitely a huge time and effort (and bug) saver to have it.

{html}", "updateAuthor": { "name": "robby", "key": "robby", "displayName": "Robby", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:57:30.000+0000", "updated": "2011-04-15T02:57:30.000+0000" }, { "id": "126200", "author": { "name": "robby", "key": "robby", "displayName": "Robby", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Brian: does you hack take in a font size and label width and\ncalculate the scaled font size from that? if so, would you mind\nsharing the code? I've developed one of my own but yours is\nprobably much better.

{html}", "updateAuthor": { "name": "robby", "key": "robby", "displayName": "Robby", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:57:30.000+0000", "updated": "2011-04-15T02:57:30.000+0000" }, { "id": "126201", "author": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

My hack's been pretty manual, scaling the font size down based\non the character length of the label beyond a hand-estimated\n'maximum chars that should fit'. :) As with yours, I only did it on\none or two high-priority labels.

\n

A proper implementation should be using font metrics by asking\nthe system how big that chunk of text would be rendered at a given\nfont size, then keep bumping the size down until it fits in the\navailable space. That could possibly be done by bumping around the\nsize of a transparent or hidden label, but that's probably slower\nand nastier than having the Java-side code do it.

{html}", "updateAuthor": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:57:31.000+0000", "updated": "2011-04-15T02:57:31.000+0000" }, { "id": "126202", "author": { "name": "robby", "key": "robby", "displayName": "Robby", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Sounds good. Mine's about the same (I estimate the text width\nbased on a pixel length of an average character for that fontSize\nand fontWeight (bold or regular)...then scale from\nthat...definitely a kludge. :)

{html}", "updateAuthor": { "name": "robby", "key": "robby", "displayName": "Robby", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:57:31.000+0000", "updated": "2011-04-15T02:57:31.000+0000" }, { "id": "176629", "author": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "body": "This is another parity issue which is affecting an app I am building in 1.8.0.1 RC3", "updateAuthor": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "created": "2011-12-19T17:19:19.000+0000", "updated": "2011-12-19T17:19:19.000+0000" }, { "id": "176635", "author": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "body": "I would say if its not going to be scheduled for fixing that, the documentation state that its iOS only - I've tested this does not work on a label using 1.8.0.1 RC3 & using Google APIS 2.3.3", "updateAuthor": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "created": "2011-12-19T17:22:01.000+0000", "updated": "2011-12-19T17:22:01.000+0000" }, { "id": "176644", "author": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Note that this property is documented as iOS only in the 1.8 RC2 docs:\r\n\r\nhttp://developer.appcelerator.com/apidoc/mobile/1.8.0.1.RC2/Titanium.UI.Label-object\r\n\r\nLabeled as a parity bug so it comes up in the appropriate searches. Would be good to get this scheduled.", "updateAuthor": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-19T17:36:39.000+0000", "updated": "2011-12-19T17:36:39.000+0000" }, { "id": "330283", "author": { "name": "bearus", "key": "bearus", "displayName": "Be Rushton", "active": true, "timeZone": "Australia/Brisbane" }, "body": "+1 for a fix to this", "updateAuthor": { "name": "bearus", "key": "bearus", "displayName": "Be Rushton", "active": true, "timeZone": "Australia/Brisbane" }, "created": "2014-11-03T09:38:24.000+0000", "updated": "2014-11-03T09:38:24.000+0000" }, { "id": "334204", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Community PR for this: https://github.com/appcelerator/titanium_mobile/pull/5909", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-12-01T21:55:05.000+0000", "updated": "2014-12-01T21:55:05.000+0000" }, { "id": "403927", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Fixed the merge conflicts, updated the indentation and the docs. \r\n\r\nUpdated PR: https://github.com/appcelerator/titanium_mobile/pull/8724\r\n\r\nDemo:\r\n{code:js}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'white'\r\n});\r\n \r\nvar label = Ti.UI.createLabel({\r\n text: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore',\r\n minimumFontSize: 6,\r\n width: 200,\r\n height: 30,\r\n color: \"#333\"\r\n});\r\n \r\nwin.add(label);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-12-30T11:40:15.000+0000", "updated": "2016-12-30T20:06:16.000+0000" }, { "id": "406075", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix with SDK 6.1.0.v20170131132207\r\nClosing.\r\n\r\nAppc Studio : 4.8.1.201612050850\r\nSDK Version : 6.1.0.v20170131132207\r\nMac OS Version : 10.12.2\r\nXcode Version : Xcode 8.2.1 Build version 8C1002\r\nAppc CLI AND Appc NPM : {\"NPM\":\"4.2.9-1\",\"CLI\":\"6.1.0\"}\r\nTi CLI : 5.0.11\r\nAlloy : 1.9.5\r\nNode : v4.6.0\r\nNexus 6 running 6.0.1, Pixel 7.1.1\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-02-01T22:18:51.000+0000", "updated": "2017-02-01T22:37:13.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }