New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
False positive for @font-face on WP7 #538
Comments
yup. looks like a false positive.. MSFT has written about it here: :( we can filter out the FP with some other detect or ignore it because of |
My vote is for ignore down to marketshare. Could increase though! |
Indeed in my country WP7 has a marketshare of about 1%. But that's not the issue I think. The issue is that Modernizr seems to falsely detect @font-face, so this problem might also exist on other browsers - not just WP7. |
Just for anyone else finding this... you can conditional comment for WP7 in case that helps... e.g.
|
Conditional comments like mentioned by @chriscoyier are borked in the current edition of Windows Mobile (7.5). They are removed completely in IE 10 in upcoming WM 8 so this particular technique is for the dustbin I think. This leaves us with UA sniffing: var ieMobile
= ( !!window.ActiveXObject && +( /IEMobile\/(\d+\.?(\d+)?)/.exec( navigator.userAgent )[1] ) ) || NaN;
if ( ! ieMobile || ieMobile >= 10 ) {
document.documentElement.className += ' webfonts';
} |
Microsoft actually do the following on their new redesign to handle this bug. /(Windows Phone)|(XBLWP)|(ZuneWP)/.test(navigator.userAgent)&&$("html").removeClass("fontface") |
conditional comments are borked in ie10 but conditional compilation is not; without actually trying it, i bet there's a way to detect ie mobile versions using @_cc....maybe via jscript detection. i could be way off...but @_cc is available to be abused by your local neighborhood user agents. |
Seems to be fixed in wp7.8 emulator; now returns false. |
I've found a false positive for @font-face on Windows Phone 7 (including 7.5). Modernizr says font-face is available, but it isn't supported at all by the platform.
This is with Modernizr 2.5.3 custom build (which includes font-face detection, obviously) on the latest release & update of the Windows Phone SDK emulator. I don't have an actual device to test this on.
The text was updated successfully, but these errors were encountered: