How to add "Google Material Icon Font" assets for "T00rk/bootstrap-material-datetimepicker"?


#1

I create bootstrap-material-datetimepicker package base on T00rk/bootstrap-material-datetimepicker.

Package.onUse(function (api) {
    api.versionsFrom('1.2.1');
    api.use('ecmascript');

    api.use([
        'jquery',
        'momentjs:moment@2.10.6',
        'fezvrasta:bootstrap-material-design@0.3.0'
    ], 'client');

    api.addAssets([
        'lib/font/Material-Design-Icons.eot',
        'lib/font/Material-Design-Icons.svg',
        'lib/font/Material-Design-Icons.ttf',
        'lib/font/Material-Design-Icons.woff',
        'lib/font/Material-Design-Icons.woff2'
    ], 'client');

    api.addFiles([
        'lib/css/bootstrap-material-datetimepicker.css',
        'lib/css/material-icons.css', // custom
        'lib/js/bootstrap-material-datetimepicker.js'
    ], 'client');
});

// lib/css/material-icons.css
@font-face {
    font-family: 'Material Icons';
    font-style: normal;
    font-weight: 400;
    src: local('Material Icons'), local('MaterialIcons-Regular'), url(https://fonts.gstatic.com/s/materialicons/v10/2fcrYFNaTjcS6g4U3t-Y5ZjZjT5FdEJ140U2DJYC3mY.woff2) format('woff2');
}

.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

But it don’t work for offline.
Please help me.