PDA

View Full Version : Text Sprite - Font property in IE7



ErnestoR
8 Aug 2012, 12:22 PM
I want to change the font of my Text Sprite to serif.
Im using Extjs 4.1.0

I have the following code



Ext.application({
name: 'FontFamilies',
launch: function() {
Ext.QuickTips.init();
var drawComponent = Ext.create('Ext.draw.Component', {
viewBox : false,
draggable : true,
items : [
{
type : 'text',
text : 'SERIF',
font : 'italic 32px serif',
x : 10,
y : 40
}
]
});


Ext.create('Ext.Window', {
width : 215,
height : 235,
layout : 'fit',
items : [drawComponent]
}).show();
}
});


My code works correctly in Firefox, Safari and Chrome but in IE7 the text sprite renders in tahoma.

Does IE7 support this the font family property in a Text Sprite?

ErnestoR
13 Aug 2012, 3:01 PM
Correction it is working only that the documentation is misleading.

the font should be declared WITH double quotes like this



textStyle: {
fill: '#000',
font: '18px "Times"'
}