Hi Harbs 2018-05-17 14:40 GMT+02:00 Harbs <harbs.li...@gmail.com>:
> Interesting. > > Why is deferred loading a problem? Adding the font to the header should > have the same effect. Shouldn’t it? > No, this way seems to end with the browser capability to load resources in parallel. > > I don’t think we want font flicker anyway. > > FWIW, the @import can be added to the theme files by a script too. > > I’d be interested in knowing what kind of performance hit @import has > relative to a standard link. I think avoiding html template is a good thing. > > Another angle on this problem might be to allow adding links via the > compiler automatically. Not sure exactly what form that might take though. > > This was something Alex propose, something in the line of @media -royale-swf, but with fonts, I think that is the right way. For now we can stick with the html template but that should be temporal. > My $0.02, > Harbs > > > On May 17, 2018, at 3:16 PM, Carlos Rovira <carlosrov...@apache.org> > wrote: > > > > we have a bug: > > > > https://github.com/apache/royale-compiler/issues/28 > > > > but as well @import is something we should run away from [1] > > > > "You shoud avoid the use of @import because it will defer the loading of > > the included resource until the file is fetched." > > > > [1] > > https://stackoverflow.com/questions/14676613/how-to- > import-google-web-font-in-css-file > > > > > > 2018-05-17 14:11 GMT+02:00 Harbs <harbs.li...@gmail.com>: > > > >> More specifically, I believe including this in the css would negate the > >> need for an HTML template: > >> > >> @import url('https://fonts.googleapis.com/css?family=Lato:400,700’); > >> > >>> On May 17, 2018, at 3:04 PM, Harbs <harbs.li...@gmail.com> wrote: > >>> > >>> Why not just include the font in the CSS file?[1] > >>> > >>> [1]https://css-tricks.com/snippets/css/using-font-face/ < > >> https://css-tricks.com/snippets/css/using-font-face/> > >>>> On May 17, 2018, at 2:57 PM, Carlos Rovira <carlosrov...@apache.org > >> <mailto:carlosrov...@apache.org>> wrote: > >>>> > >>>> One more thing, we have as in MDL the use of an html template: > >>>> > >>>> <htmlTemplate> > >>>> ${basedir}/target/javascript/bin/js-debug/jewel-example- > >> index-template.html > >>>> </htmlTemplate> > >>>> > >>>> but only to get the FONT: > >>>> > >>>> <link href="https://fonts.googleapis.com/css?family=Lato:400,700 < > >> https://fonts.googleapis.com/css?family=Lato:400,700>" rel= > >>>> "stylesheet"> > >>> > >> > >> > > > > > > -- > > Carlos Rovira > > http://about.me/carlosrovira > > -- Carlos Rovira http://about.me/carlosrovira