Comment 1 for bug 1518832

Revision history for this message
Robert Lyon (robertl-9) wrote :

The fonts that are used form this directory are included in the css via the @font-face option.

On the export we could find the places this occurs and then find out exactly which fonts we need to include via <link> tags in the header of the export html.

So for example this code in the raw theme css

@font-face {
    font-family: "Open Sans";
    font-style: italic;
    font-weight: 300;
    src: url("../fonts/opensans/OpenSansLightItalic.eot") format("embedded-opentype"), url("../fonts/opensans/OpenSansLightItalic.woff2") format("woff2"), url("../fonts/opensans/OpenSansLightItalic.woff") format("woff"), url("../fonts/opensans/OpenSansLightItalic.ttf") format("truetype"), url("../fonts/opensans/OpenSansLightItalic.svg#OpenSansLightItalic") format("svg");
}

we would find out the font-family, font-style, and font-weight so we can make a
<link href='https://fonts.googleapis.com/css?family=Open+Sans:i300' rel='stylesheet' type='text/css'>

To fetch the correct font

It would be worth doing a check of what the google api returns so that if google doesn't know about the font we still include the local one in the zip