Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25989] Windows: Unit specifier is ignored for font size

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2018-05-20T17:51:23.000+0000
Affected Version/sRelease 7.1.0
Fix Version/sRelease 7.3.0
ComponentsWindows
Labelsn/a
ReporterKota Iguchi
AssigneeKota Iguchi
Created2018-04-25T04:04:32.000+0000
Updated2018-06-18T15:17:36.000+0000

Description

Changing unit specifier for font size does not change font size.
var win = Ti.UI.createWindow({
    backgroundColor: 'green',
});

var view1 = Ti.UI.createView({
    backgroundColor: 'red',
    top: 10, left: 10,
    width: '50', height: '50'
});
var label1 = Ti.UI.createLabel({
    text: 'DEF',
    font: {
        fontSize: '18'
    }
});
view1.add(label1);

var view2 = Ti.UI.createView({
    backgroundColor: 'red',
    top: 70, left: 10,
    width: '50px', height: '50px'
});
var label2 = Ti.UI.createLabel({
    text: 'PX',
    font: {
        fontSize: '18px'
    }
});
view2.add(label2);

var view3 = Ti.UI.createView({
    backgroundColor: 'red',
    top: 130, left: 10,
    width: '50dp', height: '50dp'
});
var label3 = Ti.UI.createLabel({
    text: 'DP',
    font: {
        fontSize: '18dp'
    }
});
view3.add(label3);

var view4 = Ti.UI.createView({
    backgroundColor: 'red',
    top: 200, left: 10,
    width: '50dip', height: '50dip'
});
var label4 = Ti.UI.createLabel({
    text: 'DIP',
    font: {
        fontSize: '18dip'
    }
});
view4.add(label4);

var view5 = Ti.UI.createView({
    backgroundColor: 'red',
    top: 270, left: 10,
    width: '50pt', height: '50pt'
});
var label5= Ti.UI.createLabel({
    text: 'PT',
    font: {
        fontSize: '18pt'
    }
});
view5.add(label5);

win.add(view1);
win.add(view2);
win.add(view3);
win.add(view4);
win.add(view5);

win.open();

Comments

  1. Kota Iguchi 2018-04-25

    https://github.com/appcelerator/titanium_mobile_windows/pull/1231
  2. Samir Mohammed 2018-06-18

    Closing ticket. Fix can be seen in SDK Version: 7.3.0.v20180618062809 Test and other information can be found at: https://github.com/appcelerator/titanium_mobile_windows/pull/1231

JSON Source