Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Medium
-
Resolution: Fixed
-
Affects Version/s: Release 1.8.0
-
Fix Version/s: Release 3.1.0, 2013 Sprint 04 API, 2013 Sprint 04
-
Component/s: Android
-
Labels:
Description
On iOS, the user can select an italic font by specifying a font object like:
{ fontSize: '16', fontStyle: 'italic' }
|
In Android, there appears to be no way to select an italic font, even when using a family like DroidSerif which includes an italic face. Both:
{ fontFamily: 'DroidSerif', fontStyle: 'italic' }
|
And:
{ fontFamily: 'DroidSerif-Italic' }
|
Fail to produce the desired results.
The following code snippet demonstrates the issue. The italic fonts show up as expected on iOS, but not on Android.
var win1 = Ti.UI.createWindow({
|
backgroundColor:'white',
|
layout:'vertical'
|
});
|
|
function makeLabel(labelText, labelFont)
|
{
|
return Titanium.UI.createLabel({
|
top: 20,
|
text:labelText,
|
font:labelFont,
|
width:'auto',
|
height:'auto'
|
});
|
}
|
|
var theTestFont = 'serif';
|
|
win1.add(makeLabel('Font normal normal', { fontFamily:theTestFont, fontWeight:'normal', fontStyle:'normal'}));
|
win1.add(makeLabel('Font bold normal', { fontFamily:theTestFont, fontWeight:'bold', fontStyle:'normal'}));
|
win1.add(makeLabel('Font normal italic', { fontFamily:theTestFont, fontWeight:'normal', fontStyle:'italic'}));
|
win1.add(makeLabel('Font bold italic', { fontFamily:theTestFont, fontWeight:'bold', fontStyle:'italic'}));
|
|
win1.open();
|
Attachments
Issue Links
- is cloned into
-
TIMOB-14796 iOS: fontStyle not supported on iOS
-
- Closed
-