Issue
When using a custom font in a MobileWeb app the font is not correctly rendered, this used to worked correctly on SDK 3.2.3.GA but stopped working on 3.3.0.GA
Testing
While testing i notice in the index.html that the @font-face is different from 3.2.3.GA than the one in 3.3.0.GA
@font-face in index.html SDK 3.2.3.GA
@font-face{font-family:"futurastd-condensed-webfont";src:url("mobileweb/futurastd-condensed-webfont.woff");}
@font-face in index.html SDK 3.3.0.GA
@font-face{font-family:"futurastd-condensed-webfont";url("futurastd-condensed-webfont.woff") format("woff");}
The source parameter is missing causing an error in the CSS and not rendering the font.
Test code
var win = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
var label = Titanium.UI.createLabel({
color:'#999',
text:'I am Window 1',
font:{
fontSize:20,
fontFamily:"futurastd-condensed-webfont"},
textAlign:'center',
width:'auto'
});
win.add(label);
// open tab group
win.open();
Steps to Repro
1. Run the attached test case for Mobile Web using SDK 3.3.0.GA
Expected Result
The app will display a label with custom font
Actual Result
The app will not display a label with custom font in SDK 3.3.0 but if the test is run with 3.2.3.GA will be displayed correctly.
Workaround
On the index.html generated from deploying the app look for the @font-face CSS without the src parameter and add it in order for the css to correctly locate the file font. BeforeAfter
Marking ticket as "Won't Fix" as MobileWeb has been deprecated.
Closing as will not fix.