Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19240] iOS: Change of fontWeight or fontFamily also changes fontSize

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionDuplicate
Resolution Date2017-07-08T22:18:19.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
LabelsTCSupportTriage, font, fontFamily, fontSize, fontWeight, label
ReporterFokke Zandbergen
AssigneeEric Merriman
Created2014-11-12T13:25:29.000+0000
Updated2017-07-19T21:25:11.000+0000

Description

The following test case shows that on iOS changing only a Label's fontWeight or fontFamily will also change the fontSize. I'd expect the fontSize to stay the same, just like it does on Android.

Test case

var win = Titanium.UI.createWindow({
  backgroundColor: '#ddd',
});

win.add(Ti.UI.createLabel({
  top: 100,
  text: 'No font property',
}));

win.add(Ti.UI.createLabel({
  top: 200,
  text: 'Font property for fontWeight only',
  font: {
    fontWeight: 'bold'
  }
}));

win.add(Ti.UI.createLabel({
  top: 300,
  text: 'Font property for fontFamily only',
  font: {
    fontFamily: Ti.Platform.name === 'android' ? 'Roboto' : 'AmericanTypewriter'
  }
}));

win.open();

Attachments

FileDateSize
Screen Shot 2014-11-12 at 14.24.32.png2014-11-12T13:25:29.000+000058979
Screen Shot 2014-11-12 at 14.24.50.png2014-11-12T13:25:29.000+000033753

Comments

  1. Fokke Zandbergen 2015-04-01

    Uh... yes, that's not the issue. The issue is that the second label shows smaller while only the fontWeight is different from the first.
  2. Hans Knöchel 2017-07-08

    Fixed in 6.2.0!
  3. Lee Morris 2017-07-19

    Closing ticket as duplicate.

JSON Source