Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14796] iOS: fontStyle not supported on iOS

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-09-30T16:43:23.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 20, 2013 Sprint 20 API, Release 3.2.0
ComponentsiOS
Labelsmodule_label, parity, qe-3.1.2, qe-testadded
ReporterOlga Romero
AssigneeIngo Muschenetz
Created2013-08-09T17:13:48.000+0000
Updated2017-06-14T22:36:11.000+0000

Description

The following code snippet demonstrates the issue. The italic fonts does not show up as expected on iOS (bold), on Android it does work.
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

FileDateSize
android.png2013-08-09T17:24:24.000+000022750
bold_same_as_normal.png2013-08-09T17:24:24.000+000030388

Comments

  1. Federico Casali 2013-08-30

    Reproducible on: Titanium SDK 3.1.3.v20130829174830 Appcelerator Studio 3.1.3.201308252005 Xcode 5 beta6 on iOS 7 simulator and iOS7 iPad mini
  2. Vishal Duggal 2013-09-25

    Serif is not a valid font for iOS. Works with a valid font say 'Helvetica Neue' Anyways our fallback mechanism needs update so we'll fix that.
  3. Sabil Rahim 2013-09-30

    Fixed as Mentioned by Vishal. Works well with Helvetica Neue.
  4. Pragya Rastogi 2013-10-10

    Verified Fix with OSX: 10.8.5 Xcode:5.0 Appcelerator Studio: 3.2.0.201310091613 SDK:3.2.0.v20131009134844 acs:1.0.7 alloy:1.2.2 npm:1.3.2 titanium:3.2.0 titanium-code-processo:1.0.3 Device: iPod touch2 (viOS7)

JSON Source