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

iOS: Changing an Attributed String's fontWeight or fontFamily also changes fontSize

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Duplicate
    • Affects Version/s: Release 4.1.1
    • Fix Version/s: None
    • Component/s: iOS
    • Labels:
    • Environment:

      3.4.1.RC

      Description

      The following test case shows that changing part of an Attributed String's fontWeight or fontFamily also changes the fontSize:

      Test Case

      var win = Titanium.UI.createWindow({
        backgroundColor: '#ddd',
      });
       
      win.add(Ti.UI.createLabel({
        attributedString: Ti.UI.iOS.createAttributedString({
          text: 'fontWeight unstyled fontFamily',
          attributes: [{
            type: Ti.UI.iOS.ATTRIBUTE_FONT,
            value: {
              fontWeight: 'bold'
            },
            range: [0, 10]
          }, {
            type: Ti.UI.iOS.ATTRIBUTE_FONT,
            value: {
              fontFamily: 'AmericanTypewriter'
            },
            range: [20, 10]
          }]
        })
      }));
       
      win.open();
      

      This is probably related to https://jira.appcelerator.org/browse/TC-4990

        Attachments

          Activity

            People

            • Assignee:
              emerriman Eric Merriman
              Reporter:
              fokkezb Fokke Zandbergen
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code