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

feat(android): add letterSpacing to Label

Open m1ga opened this issue 5 months ago • 0 comments

iOS can do letterspacing with a attributedString already. Android doesn't have this property. As it just a text property I've added it the same way as lineSpacing so it is a native Label property.

var win = Ti.UI.createWindow({
	layout: "vertical"
});
var textLabel = Ti.UI.createLabel({
	text: "some text",
	letterSpacing: -0.1,
	font: {
		fontSize: 40
	}
});
var textLabel2 = Ti.UI.createLabel({
	text: "some text",
	letterSpacing: 0.1,
	font: {
		fontSize: 40
	}
});

win.add([textLabel, textLabel2]);
win.open();

Screenshot_20240205-091745

m1ga avatar Feb 05 '24 08:02 m1ga