vaadin 11 + WebFontConfig ?

How to add the following part on the page with vaadin 11?

    <!--  = Google Fonts =  -->
    <script type="text/javascript">
        WebFontConfig = {
            google: {
                families: ['Open+Sans:400,700,400italic,700italic:latin,latin-ext,cyrillic', 'Pacifico::latin']

            }
        };
        (function () {
            var wf = document.createElement('script');
            wf.src = ('https:' == document.location.protocol ? 'https' : 'http') + '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
            wf.type = 'text/javascript';
            wf.async = 'true';
            var s = document.getElementsByTagName('script')[0]
;
            s.parentNode.insertBefore(wf, s);
        })();
    </script>

Hello Aliaksandr,

I think you could create an HTML file in you frontend folder with the content that you described above.

After that, you can use @HtmlImport annotation to import it in you view.

Another alternative is using @JavaScript annotation.