Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-24882

iOS: Label font is downscaled lower than minimumFontSize for AttributedString

    Details

    • Type: Bug
    • Status: Open
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: Release 6.1.0, Release 8.0.0
    • Fix Version/s: None
    • Component/s: iOS

      Description

      Summary:
      If a label is set up to use a "minimumFontSize" and an "attributedString", but the "font" property was not assigned, then the text can be downscaled lower than the configured "minimumFontSize".

      Code to reproduce:

      var window = Ti.UI.createWindow({ backgroundColor: "gray" });
      window.add(Ti.UI.createLabel(
      {
      	attributedString: Ti.UI.createAttributedString(
      	{
      		text: "Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal.",
      	}),
      	color: "white",
      	backgroundColor: "black",
      //	font: { fontSize: 20 },
      	minimumFontSize: 10,
      }));
      window.open();
      

      Result:
      Text font size is downscaled to fit the entire text. It is exceeding the configured "minimumFontSize".

      Notes:

      • This is not an issue with the "text" property. Only with "attributedString".
      • This downscaling issue goes away with "attributedString" if the Label's "font" property is assigned.

      Work-Around:
      Assign the Label's "font" property. For example, you can set it up to use the default font size by assigning it an empty table like this...

      myLabel.font = {};
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jquick Joshua Quick
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-10826
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration