Font renders upside-down on IE9 Beta

Bug #655394 reported by Brian Ward
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
typeface.js
Fix Released
Undecided
Unassigned

Bug Description

typeface.js is currently rendering the font upside-down on the IE9 beta.

Revision history for this message
Owen Sammut (owen-concept8) wrote :

Is this for all instances of IE9?

Im having the same problem across all of my websites using typeface.

Revision history for this message
Njal (njal) wrote :

Same problem here! All instances of IE9 I have tested with!

Revision history for this message
Ben Cummins (ben-bencummins) wrote :

The issue seems to be in the _renderGlyph method.

As I can't find a proper fix - I created a work around..

used this to get the browser version..
function getInternetExplorerVersion()
{
  var rv = -1; // Return value assumes failure.
  if (navigator.appName == 'Microsoft Internet Explorer')
  {
    var ua = navigator.userAgent;
    var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
    if (re.exec(ua) != null)
      rv = parseFloat( RegExp.$1 );
  }
  return rv;
}

var browserVersion = getInternetExplorerVersion();

and then, changed the switch statement in the _renderGlyph method..

       switch(outline[i++]) {
        case 'q':
         outline[i] = Math.round(outline[i++]);
         if (browserVersion>=9)
         {
             outline[i] = -Math.round(outline[i++]);
         }
         else
         {
             outline[i] = Math.round(outline[i++]);
         }
        case 'm':
        case 'l':
         outline[i] = Math.round(outline[i++]);
         if (browserVersion>=9)
         {
             outline[i] = -Math.round(outline[i++]);
         }
         else
         {
             outline[i] = Math.round(outline[i++]);
         }
         break;
       }

Revision history for this message
Delete Me Plz (delete-me-plz-deactivatedaccount-deactivatedaccount-deactivatedaccount) wrote :

Thanks Ben, that works for me.

Changed in typeface.js:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.