Sha256: cec822f0dda01b32f1219a6a996012be3b5ce1b3d60e392335f5bf2ee19b6c05

Contents?: true

Size: 880 Bytes

Versions: 144

Compression:

Stored size: 880 Bytes

Contents

/*
 * Test for SubPixel Font Rendering
 * (to infer if GDI or DirectWrite is used on Windows)
 * Authors: @derSchepp, @gerritvanaaken, @rodneyrehm, @yatil, @ryanseddon
 * Web: https://github.com/gerritvanaaken/subpixeldetect
 */
Modernizr.addTest('subpixelfont', function() {
    var bool,
        styles = "#modernizr{position: absolute; top: -10em; visibility:hidden; font: normal 10px arial;}#subpixel{float: left; font-size: 33.3333%;}";
    
    // see https://github.com/Modernizr/Modernizr/blob/master/modernizr.js#L97
    Modernizr.testStyles(styles, function(elem) {
        var subpixel = elem.firstChild;

        subpixel.innerHTML = 'This is a text written in Arial';

        bool = window.getComputedStyle ?
            window.getComputedStyle(subpixel, null).getPropertyValue("width") !== '44px'
            : false;
    }, 1, ['subpixel']);

    return bool;
});

Version data entries

144 entries across 144 versions & 7 rubygems

Version Path
jekyll-theme-pirati-7.7.1 _sass/foundation-sites/vendor/modernizr/feature-detects/css-subpixelfont.js
jekyll-theme-pirati-7.7.0 _sass/foundation-sites/vendor/modernizr/feature-detects/css-subpixelfont.js
jekyll-theme-pirati-7.6.2 _sass/foundation-sites/vendor/modernizr/feature-detects/css-subpixelfont.js
jekyll-theme-pirati-7.6.1 _sass/foundation-sites/vendor/modernizr/feature-detects/css-subpixelfont.js
jekyll-theme-pirati-7.6.0 _sass/foundation-sites/vendor/modernizr/feature-detects/css-subpixelfont.js
jekyll-theme-pirati-7.5.0 _sass/foundation-sites/vendor/modernizr/feature-detects/css-subpixelfont.js
jekyll-theme-pirati-7.4.0 _sass/foundation-sites/vendor/modernizr/feature-detects/css-subpixelfont.js
jekyll-theme-pirati-7.3.0 _sass/foundation-sites/vendor/modernizr/feature-detects/css-subpixelfont.js
jekyll-theme-pirati-7.2.0 _sass/foundation-sites/vendor/modernizr/feature-detects/css-subpixelfont.js
jekyll-theme-pirati-7.1.1 _sass/foundation-sites/vendor/modernizr/feature-detects/css-subpixelfont.js
jekyll-theme-pirati-7.0.0 _sass/foundation-sites/vendor/modernizr/feature-detects/css-subpixelfont.js
jekyll-theme-pirati-6.9.0 _sass/foundation-sites/vendor/modernizr/feature-detects/css-subpixelfont.js
jekyll-theme-pirati-6.8.0 _sass/foundation-sites/vendor/modernizr/feature-detects/css-subpixelfont.js
jekyll-theme-pirati-6.7.2 _sass/foundation-sites/vendor/modernizr/feature-detects/css-subpixelfont.js
jekyll-theme-pirati-6.7.0 _sass/foundation-sites/vendor/modernizr/feature-detects/css-subpixelfont.js
jekyll-theme-pirati-6.6.2 _sass/foundation-sites/vendor/modernizr/feature-detects/css-subpixelfont.js
jekyll-theme-pirati-6.6.1 _sass/foundation-sites/vendor/modernizr/feature-detects/css-subpixelfont.js
jekyll-theme-pirati-6.6.0 _sass/foundation-sites/vendor/modernizr/feature-detects/css-subpixelfont.js
jekyll-theme-pirati-6.5.0 _sass/foundation-sites/vendor/modernizr/feature-detects/css-subpixelfont.js
jekyll-theme-pirati-6.4.0 _sass/foundation-sites/vendor/modernizr/feature-detects/css-subpixelfont.js