Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24217] iOS: Label clips letters for some fonts

GitHub Issuen/a
TypeImprovement
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsfont, label,, titanium
ReporterNikos Poulios
AssigneeUnknown
Created2016-12-13T16:02:11.000+0000
Updated2018-02-28T19:55:31.000+0000

Description

Not exactly a new issue but it keeps on coming back. Some letters get cut with specific fonts that appear fine on desktop and web use. An example of this is Charter-BoldItalic.ttf. As you can see in the screenshot the lower left corner of the first letter A is clipped no matter how the label is placed or the text alignment mode or clipMode is set. In CharterBoldItalic.png you can see that Titanium clips the part that it's out of the inner boundaries. Example code
var self = Ti.UI.createWindowView();
	
	var label = Ti.UI.createLabel({
		color:'#000000',
		text:'An example label',
		height:'auto',
		borderColor:'black',
		textAlign:'center',
		width:Ti.UI.FILL,
		font:{
			fontFamily:'Charter-BoldItalic',
			fontSize:'23dp'
		}
	});
	
	self.add(label);
	self.open();

Attachments

FileDateSize
CharterBoldItalic.png2016-12-13T16:00:44.000+000058353
Charter-BoldItalic.ttf2016-12-13T16:00:44.000+000040436
Simulator Screen Shot Dec 13, 2016, 4.46.44 PM.png2016-12-13T16:00:44.000+000029204

Comments

  1. Sharif AbuDarda 2016-12-13

    Hello, Thanks for submitting the ticket. I have tested the issue with your sample code with the font. I have observed the same behavior. I will forward this to engineering to work on for a fix. Thanks.
  2. Nikos Poulios 2016-12-14

    Rendering issue exists also on Android, with the same result

JSON Source