I've built a single page app with VanillaJS, Webpack and Material Design Lite. The application runs fine in a browser and is rendered correctly.
I would like to get this webapp in a JavaFX Webview. Everything is working well, excepting that the Material Icons are not rendered.
I've tried this :
Font.loadFont(
this.getClass().getClassLoader().getResource("fonts/MaterialIcons-Regular.woff").toExternalForm(), 10
);
But it didn't work.
I've tried to encode Material Design icons font directly as base64 in the css file, using this Webpack configuration:
{
test: /\.(eot|svg|ttf|woff|woff2)$/,
include: path.join(__dirname, 'node_modules', 'mdl-pack', 'dist', 'icons'),
loader: 'url-loader?limit=100000'
}
Didn't work too.
I've used the webview debugger and can see that woff font is loaded by the webview.
Does somebody already loaded icons font in JavaFX Webview? How do you proceed?