titanium-sdk icon indicating copy to clipboard operation
titanium-sdk copied to clipboard

iOS: Label height incorrect when using minimumFontSize

Open m1ga opened this issue 2 years ago • 3 comments

When setting minimumFontSize the label won't shrink to the actual label height. It will stay at the "max" fontSize height:

fontsize
var win = Ti.UI.createWindow({backgroundColor: 'white'});
var lbl = Ti.UI.createLabel({
  width: Ti.UI.FILL,
  height:Ti.UI.SIZE,
  text:"test test test test",
  minimumFontSize: 20,
  font:{
    fontSize: 400
  },
  backgroundColor:"red"
});
win.add(lbl);
win.open();

The red background should just be the height of the text. The minimumFontSize is set here

Tested with Titanium SDK 10.1.0.GA

m1ga avatar Oct 30 '21 22:10 m1ga

There is an open ticket for this issue here... https://jira.appcelerator.org/browse/TIMOB-24864

jquick-axway avatar Nov 01 '21 19:11 jquick-axway

https://github.com/mbender74/ti.labelextension-ios

mbender74 avatar Jan 19 '22 20:01 mbender74

with this module ->

demo

mbender74 avatar Jan 19 '22 20:01 mbender74