Forum Moderators: open

Message Too Old, No Replies

Odd problem.font degrading in IE

Odd problem...font degrading in IE

         

joeconlin

5:36 pm on Dec 3, 2007 (gmt 0)

10+ Year Member



Hello,

I am just finishing a site and to my surprise, ;), IE is is not cooperating. Basically, I have coded the site in one page and am using javascript to control what is displayed. For some odd reason, IE is "degrading" my text when it is rendered on the screen. It is like there is no anti-aliasing on. Firefox and Opera are perfect. Not sure if I am explaining this clearly but any text, no matter what font-family I use, looks like font smothing has been turned off, but it is not. Strange, I know.

I have a feeling that it is to do with my javascript so I will post that first and can post the rest of the html if needed.

Thank you in advance! Joe

var visiblePage = 'home';
var showFolio = '';
var folioBox = '';
var arVersion = navigator.appVersion.split("MSIE");
var version = parseFloat(arVersion[1]);

$(document).ready(function() {
if((version >= 5.5) && (version < 7.0) && (document.body.filters)) {
fixIEPng();
}
$("#wrap").fadeIn(700);
$("#home").click( function () { togglePage('home'); } );
$("#logo").click( function () { togglePage('home'); } );
$("#work").click( function () { togglePage('work'); } );
$("a.work").click( function () { togglePage('work'); } );
$("#about").click( function () { togglePage('about'); } );
$("#whatwedo").click( function () { togglePage('whatwedo'); } );
$("a.whatwedo").click( function () { togglePage('whatwedo'); } );
$("#contact").click( function () { togglePage('contact'); } );
$("a.contact").click( function () { togglePage('contact'); } );
$("#folioStrip a.ms").click( function () { showFolio = 'ms'; togglePage('work'); } );
$("#folioStrip a.msw").click( function () { showFolio = 'msw'; togglePage('work'); } );
$("#folioStrip a.aw").click( function () { showFolio = 'aw'; togglePage('work'); } );
$("#folioStrip a.rz").click( function () { showFolio = 'rz'; togglePage('work'); } );
$("#folioStrip a.wi").click( function () { showFolio = 'wi'; togglePage('work'); } );
$("#projectms").hover( function () { $("#greyms").fadeOut(250); }, function () { $("#greyms").fadeIn(250); } );
$("#projectmsw").hover( function () { $("#greymsw").fadeOut(500); }, function () { $("#greymsw").fadeIn(500); } );
$("#projectrz").hover( function () { $("#greyrz").fadeOut(500); }, function () { $("#greyrz").fadeIn(500); } );
$("#projectaw").hover( function () { $("#greyaw").fadeOut(500); }, function () { $("#greyaw").fadeIn(500); } );
$("#projectwi").hover( function () { $("#greywi").fadeOut(500); }, function () { $("#greywi").fadeIn(500); } );
$("#projectms").click( function () { showBox('ms'); } );
$("#projectmsw").click( function () { showBox('msw'); } );
$("#projectrz").click( function () { showBox('rz'); } );
$("#projectaw").click( function () { showBox('aw'); } );
$("#projectwi").click( function () { showBox('wi'); } );
$("#overlay").click( function () { hideBox(); } );
$("a[class='closebox']").click( function () { hideBox(); } );
$("a.newWin").click( function () { newWin($(this).attr("href")); return false; } );

$("#send").click( function () {
if(checkContactForm() === true) {
var xdata = 'contact=true';
xdata += '&name=' + $("input[name='cname']").val();
xdata += '&email=' + $("input[name='cemail']").val();
xdata += '&phone=' + $("input[name='cphone']").val();
xdata += '&company=' + $("input[name='ccompany']").val();
xdata += '&url=' + $("input[name='curl']").val();
xdata += '&media=' + $("select[name='media']").val();
xdata += '&timeline=' + $("select[name='timeline']").val();
xdata += '&budget=' + $("select[name='budget']").val();
xdata += '&message=' + $("textarea[name='message']").val();
$("#contactTable").fadeOut(400);
$.ajax({
type: "POST",
url: "/",
data: xdata,
success: function(msg){
$("#thanks").fadeIn();
document.forms.contactForm.reset();
}
});
}
});
});

function togglePage( page ) {
if(page!= visiblePage) {
if((page!= 'home') && (visiblePage!= '')) {
$("div.hline").fadeIn(500);
} else if (page == 'home') {
$("div.hline").fadeOut(500);
}
setHeight = ($("#" + page + "Content").height() + 0);
$("#body").animate( { height: setHeight + 'px'}, 500 );
if(visiblePage!= '') {
$("#" + visiblePage + "Content").fadeOut(500);
}
showContent( page );
} else if((showFolio!= '') && (visiblePage == 'work')) {
showBox( showFolio );
}
$("#" + page).blur();
}

function showContent( page ) {
if(visiblePage!= '') {
$("#" + visiblePage + "Content").hide();
}
if(showFolio!= '') {
$("#" + page + "Content").fadeIn("fast");
setTimeout('showBox("' + showFolio + '");', 1500);

showFolio = '';
} else {
$("#" + page + "Content").fadeIn("fast");
}
visiblePage = page;
}

function checkContactForm() {
var err = '';
if($("input[name='cname']").val() == '') {
err = 'a contact name.';
} else if($("input[name='cemail']").val() == '') {
err = 'a contact email address.';
} else if($("textarea[name='message']").val() == '') {
err = 'your message.';
}
if(err!= '') {
alert('Please enter ' + err);
return false;
}
return true;
}

function showBox( page ) {
folioBox = page;
$( '#overlay' ).fadeIn(250);
center( page );
return false;
}

function hideBox() {
$( '#hidden' + folioBox ).fadeOut(500);
$( '#overlay' ).fadeOut(500);
return false;
}

function center( page ) {
var element = $( '#hidden' + page );
var w = element.width();
var h = element.height();
var winW = document.documentElement.clientWidth;
var winH = document.documentElement.clientHeight;
var posX = Math.round((winW / 2) - (w / 2));
var posY = Math.round((winH / 2) - (h / 2));
if(posY < h) {
posY = 75;
}
posY = (posY + document.documentElement.scrollTop);
tH = ($('#wrap').height() + 200);
$( '#overlay' ).height( tH );
element.css({ top: posY + "px", left: posX + "px" });
element.fadeIn(1000);
}

function newWin(url) {
window.open(url);
}

Trace

7:06 pm on Dec 3, 2007 (gmt 0)

10+ Year Member



You seem to be describing "Clear Type" which is automatically turned on in IE 7.

Tools --> Internet Options --> Multimedia
remove the check box for;
[ ]Always use Clear Type for HTML*

Hope that's what you're talking about.

joeconlin

9:04 pm on Dec 3, 2007 (gmt 0)

10+ Year Member



Actually, Clear Type is turned on (first thing I checked). The reason I believe that it has something to do with my js is that my footer is outside of the div that the js is controlling and the text renders perfect there. This is one of the stranger issues that I have had.

Please take a look at what I am talking about in IE at <url removed>. REMEMBER: The footer is outside the main div.

[edited by: encyclo at 1:10 am (utc) on Dec. 8, 2007]
[edit reason] no URLs thanks [/edit]

joeconlin

6:13 pm on Dec 7, 2007 (gmt 0)

10+ Year Member



bump...