PDA

View Full Version : Chart:Font family in IE9 64 bits



adp-gmt
7 Aug 2012, 5:20 AM
Hello,
I'm using EXTJS 4.1.1 and I have a problem with the font family in IE9 64bits.
Example:



Ext.require('Ext.chart.*');
Ext.onReady(function() {
var store = Ext.create('Ext.data.JsonStore', {
fields: ['name', 'data1'],
data: [
{ 'name': 'metric one', 'data1': 25},
{ 'name': 'metric two', 'data1': 14}
]
});

var mychart = Ext.create('Ext.chart.Chart', {
renderTo: Ext.getBody(),
width: 300,
height: 300,
store: store,
legend: true,
axes: [
{
type: 'Numeric',
position: 'left',
fields: 'data1',
title: 'Sample Values',
minimum:0
},
{
type: 'Category',
position: 'bottom',
fields: 'name',
title: 'Sample Metrics'
}
],
series: [{
type: 'column',
axis: 'left',
xField: 'name',
yField: 'data1',
label: {
field:'data1',
renderer: Ext.util.Format.numberRenderer('0')
}
}]
});
});

Result:
It works fine in IE9 32 bits
37786

but in IE9 64 bits,the font family is pretty strange
37787
Is it an EXTJS bug?

scottmartin
8 Aug 2012, 12:57 PM
I have not seen any reports. Can you look at the elements for this in your debugger and see what the font-family is for each? I do not have a 64bit VM loaded at the moment.

Scott.

adp-gmt
8 Aug 2012, 8:51 PM
37820

jfb_1973
10 Aug 2012, 8:07 AM
I'm seeing the same thing. I don't think it's a 64bit vs 32bit thing. I think it has to do with what fonts are installed on the system.

In my environment the font is Verdana, Arial, Helvetic, sans-serif. On some systems (not all) I'm seeing the same fancy script font in charts that the OP posted screenshots of. I only see it in IE, and I believe it's also limited to IE9.

jfb_1973
10 Aug 2012, 8:15 AM
Correction, it appears in both IE8 and IE9.

scottmartin
10 Aug 2012, 8:42 AM
When I load in IE, the default is Arial 18px.

I see the OP must not have this, as their default is not Arial and on the 64 has the script.

Since you are able to get different results on different PC's, then this does lead me to believe that it is related to installed fonts, as it will walk down the tree until it finds a font it can recognize.

Scott.

jfb_1973
25 Sep 2012, 12:40 PM
I found a couple of an instance of this problem outside of ext.

http://stackoverflow.com/questions/6931089/google-charts-in-ie7

It appears that this occurs when IE8 or IE9 switch to IE7 mode due to the site being in the 'intranet zone'. I couldn't get this to occur on all PCs, so it appears that there's may be something relating to the fonts installed on the system.

The solution I found was to explicity set the fonts. So when I define my legend, axes and labels, I specify the font that I want. That resolved the problem.

scottmartin
25 Sep 2012, 1:09 PM
Thank you for the follow-up. I am sure it will help down the line.

Scott.