Problem description
On BlackBerry, an error is thrown when using a fontSize expressed in 'dp' and fontSize is not correctly displayed.
Steps to reproduce (Alloy sample)
index.xml
<Alloy>
<Window class="container">
<Label id='label1' top='5'>Label using dp</Label>
<Label id="label2" top='20'>Another Label</Label>
</Window>
</Alloy>
index.tss
".container": {
backgroundColor:"white"
}
"Label": {
width: Ti.UI.SIZE,
height: Ti.UI.SIZE,
color: "#000",
font:{
fontSize:'55dp'
}
}
"#label2":{
font:{
fontSize:5
}
}
index.js
$.index.open();
1. Run the sample code
2. In the console:
[N_DEBUG] virtual int NativeAbstractTextControlObject::setFont(TiObject*) Line 142: Failed to convert font size to float with value: 55dp
3. On screen, 'label1' size is not reflecting the '55dp' value
https://github.com/appcelerator/titanium_mobile_blackberry/pull/150
Verified fixed on: Mac OSX 10.9 Mavericks Titanium Studio, build: 3.2.0.201311122225 Titanium SDK, build: 3.2.0.v20131113094843 CLI: 3.2.0 Alloy: 1.3.0 BlackBerry Simulator: 10.2.0.1791 Label1 font size is set and displaying at 55dp. Label2 font size is set and displaying at 5. Simulator displays both as expected. Closing.