summaryrefslogtreecommitdiff
path: root/examples/css-file/README
blob: 93c43e5934dadccb6dc637f2db778aaebae76326 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
CSS-FILE EXAMPLE
================

Run `make` using the installed SVGC and open `view.html`.
The program includes `fonts.css` in the generated example.svg <defs>
section.

The CSS text is embedded in example.svg, but the font files are *not*
embedded. Place a legitimately redistributable `Roboto-Regular.woff2`
file in the `fonts/` subdirectory next to example.svg, or use a locally
installed Roboto font. This package intentionally does not distribute
font binaries.

Relative url(...) paths in the embedded CSS are resolved against
example.svg, not against the original fonts.css or view.html. Some
browsers enforce security restrictions on local file:// font loading.
Serving the example from a local HTTP server may be needed for reliable
font rendering.