Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24823] iOS: Label font style does not show italic when bold

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionNot Our Bug
Resolution Date2020-09-21T11:29:48.000+0000
Affected Version/sRelease 6.0.0, Release 6.1.0, Release 8.0.0
Fix Version/sn/a
Componentsn/a
LabelsengSchedule, qe-6.1.0, qe-6.1.1
ReporterAbir Mukherjee
AssigneeVijay Singh
Created2017-06-14T22:36:11.000+0000
Updated2020-09-21T11:29:48.000+0000

Description

*Description* When setting fontStyle for a label to italic in combination with fontWeight to bold, the resulting text shows up in bold as expected, but the style is displayed in normal instead of italic. *Steps to reproduce* 1. Create a classic app, use the demo code below. 2. Launch app in either simulator or device. 3. Observe the the fontstyle and fontweight as indicated in the label text. *Result* 1. For scenarios where either the fontStyle or the fontWeight is normal the font appears as expected. 2. For the last scenario where fontStyle is italic and fontWeight is bold, the text is appearing as bold but the style is not italic. *Expected Result* In the case where fontStyle is italic and fontWeight is bold, the text should appear bold and italic. *Demo Code*
var window = Ti.UI.createWindow({
        backgroundColor: '#fff'
    });
window.layout = 'vertical';

function makeLabel(labelText, labelFont) {
    return Titanium.UI.createLabel({
        top: 20,
        text: labelText,
        font: labelFont,
        width: 'auto',
        height: 'auto'
    });
}

var theTestFont = 'serif';

 window.add(makeLabel('Font normal normal', {
    fontFamily: theTestFont,
    fontWeight: 'normal',
    fontStyle: 'normal'
}));
 window.add(makeLabel('Font bold normal', {
    fontFamily: theTestFont,
    fontWeight: 'bold',
    fontStyle: 'normal'
}));
 window.add(makeLabel('Font normal italic', {
    fontFamily: theTestFont,
    fontWeight: 'normal',
    fontStyle: 'italic'
}));
 window.add(makeLabel('Font bold italic', {
    fontFamily: theTestFont,
    fontWeight: 'bold',
    fontStyle: 'italic'
}));
window.open();

Attachments

FileDateSize
9_2_0.png2020-09-03T17:36:48.000+000042942
iOS14.png2020-09-21T11:29:22.000+000042532
Screen Shot 2017-06-14 at 3.21.20 PM.png2017-06-14T22:34:03.000+000031868

Comments

  1. Ewan Harris 2020-09-04

    Yeah this looks to be fixed when building with Xcode 12 to an iOS 14 sim/device but not on Xcode 11/iOS 13. So I guess we can close this as not our bug
  2. Ewan Harris 2020-09-21

    Closing as not our bug as issue is now fixed in iOS 14

JSON Source