Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25971] iOS: minimumFontSize property in Ti.UI.label lowers text baseline as it decreases

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2018-08-24T17:30:38.000+0000
Affected Version/sRelease 5.5.1, Release 6.3.0, Release 7.1.0
Fix Version/sRelease 7.5.0
ComponentsiOS
Labelsios, label, minimumFontSize
ReporterJoe Falcone
AssigneeVijay Singh
Created2018-04-17T01:44:39.000+0000
Updated2018-08-24T17:30:50.000+0000

Description

We've observed this problem for quite a while (I think it might also be in SDK 5.5) but it was one of those "am I seeing things or is this really happening?" bugs. I finally sat down and ran some test cases and it is really happening. As the attached test code shows, set the original font size such that the string does not fit the width of the label. Then steadily decrease minimumFontSize until the string fits. The string eventually fits into the label but the baseline of the text drops a little bit every time minimumFontSize is decreased. We set borderWidth to 2 so that you can see the text move relative to the boundaries of the label. We have several apps that require this functionality - it used to work properly somewhere in the SDK 5 generation. The same code runs correctly on Android 7.1 (see screenshot)

Attachments

FileDateSize
Label.zip2018-04-17T01:42:28.000+00005548907
Screen Shot 2018-07-20 at 17.32.21.png2018-07-20T16:34:30.000+000077268
Screen Shot Android.png2018-04-17T01:43:11.000+000045241
Simulator Screen Shot - iPhone 6 - 2018-04-16 at 18.22.40.png2018-04-17T01:29:53.000+000056056

Comments

  1. Vijay Singh 2018-04-19

    PR : https://github.com/appcelerator/titanium_mobile/pull/10006 Test-Case: [^Label.zip]
  2. Hans Knöchel 2018-04-19

    [~jfalcone] A core-fix is pending via pull request. You can patch your SDK today to get around the issue and the fix will land in Titanium SDK 7.3.0, since 7.1.1 and 7.2.0 are already closed for new tickets. Thanks!
  3. Samir Mohammed 2018-07-20

JSON Source