diff options
author | Tobias Adam <mail@tobiadam.de> | 2016-03-22 21:39:21 +0100 |
---|---|---|
committer | Felix Hammerl <fhammerl@thoughtworks.com> | 2016-03-24 12:22:25 +0100 |
commit | e887b933ab9b6f83d6ebe02138ea3cd79d30c710 (patch) | |
tree | 20ca554036a9be87377cc11fd0c1d67bbf6d49fc | |
parent | b67fe3688bd4a49f08714ac46f8230c23816dca7 (diff) |
Work in progress: Fix loading webfonts in the sandbox.
-rw-r--r-- | service/pixelated/resources/sandbox_resource.py | 1 | ||||
-rw-r--r-- | web-ui/app/scss/opensans.scss | 60 |
2 files changed, 61 insertions, 0 deletions
diff --git a/service/pixelated/resources/sandbox_resource.py b/service/pixelated/resources/sandbox_resource.py index 28e8c9be..a2d41cb7 100644 --- a/service/pixelated/resources/sandbox_resource.py +++ b/service/pixelated/resources/sandbox_resource.py @@ -31,4 +31,5 @@ class SandboxResource(File): request.setHeader('Content-Security-Policy', self.CSP_HEADER_VALUES) request.setHeader('X-Content-Security-Policy', self.CSP_HEADER_VALUES) request.setHeader('X-Webkit-CSP', self.CSP_HEADER_VALUES) + request.setHeader('Access-Control-Allow-Origin', '*') return super(SandboxResource, self).render_GET(request) diff --git a/web-ui/app/scss/opensans.scss b/web-ui/app/scss/opensans.scss new file mode 100644 index 00000000..4a179f8f --- /dev/null +++ b/web-ui/app/scss/opensans.scss @@ -0,0 +1,60 @@ +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 300; + src: local('Open Sans Light'), local('OpenSans-Light'), url('/sandbox/fonts/OpenSans-Light.woff') format('woff'); +} +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 400; + src: local('Open Sans'), local('OpenSans'), url('/sandbox/fonts/OpenSans.woff') format('woff'); +} +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 600; + src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url('/sandbox/fonts/OpenSans-Semibold.woff') format('woff'); +} +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 700; + src: local('Open Sans Bold'), local('OpenSans-Bold'), url('/sandbox/fonts/OpenSans-Bold.woff') format('woff'); +} +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 800; + src: local('Open Sans Extrabold'), local('OpenSans-Extrabold'), url('/sandbox/fonts/OpenSans-Extrabold.woff') format('woff'); +} +@font-face { + font-family: 'Open Sans'; + font-style: italic; + font-weight: 300; + src: local('Open Sans Light Italic'), local('OpenSansLight-Italic'), url('/sandbox/fonts/OpenSansLight-Italic.woff') format('woff'); +} +@font-face { + font-family: 'Open Sans'; + font-style: italic; + font-weight: 400; + src: local('Open Sans Italic'), local('OpenSans-Italic'), url('/sandbox/fonts/OpenSans-Italic.woff') format('woff'); +} +@font-face { + font-family: 'Open Sans'; + font-style: italic; + font-weight: 600; + src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url('/sandbox/fonts/OpenSans-SemiboldItalic.woff') format('woff'); +} +@font-face { + font-family: 'Open Sans'; + font-style: italic; + font-weight: 700; + src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), url('/sandbox/fonts/OpenSans-BoldItalic.woff') format('woff'); +} +@font-face { + font-family: 'Open Sans'; + font-style: italic; + font-weight: 800; + src: local('Open Sans Extrabold Italic'), local('OpenSans-ExtraboldItalic'), url('/sandbox/fonts/OpenSans-ExtraboldItalic.woff') format('woff'); +} |