about summary refs log tree commit diff
path: root/storybook
diff options
context:
space:
mode:
authorBillie Thompson <billie@purplebooth.co.uk>2017-01-26 14:06:40 +0000
committerBillie Thompson <billie@purplebooth.co.uk>2017-01-26 20:09:03 +0000
commit55fa8e61e2c43658de8d4352530c36cdcffc977f (patch)
tree08b6a6f2024fbde294c309765ece796ed80e2c3d /storybook
parent6ba302b725c53645bc20591c63fa21aa465dbcf0 (diff)
Move the fonts from Google Fonts to local assets
Currently we have two problems that are resolved by this change.

The first is that we have a dependency on Google Fonts, which means
that should it ever go down, or it have issues we would also have
issues. This will resolve this by moving the dependencies we load from
there to the local server.

The second issue is that Google Fonts is currently returning the
`local()` css font source. This causes a problem where the users browser
fails to fallback to a missing glyph, resulting in many unusual
characters displaying the failure glyph. This will resolve this by
creating a font-family definition that does not use the `local()`
source.

I did not update the error pages with local fonts, they still use the
remote google fonts api, so they're a self contained page that does not
use the asset pipeline.

This resolves tootsuite/mastodon#531 and tootsuite/mastodon#12
Diffstat (limited to 'storybook')
-rw-r--r--storybook/storybook.scss4
1 files changed, 2 insertions, 2 deletions
diff --git a/storybook/storybook.scss b/storybook/storybook.scss
index 31f11b5ad..6058d658b 100644
--- a/storybook/storybook.scss
+++ b/storybook/storybook.scss
@@ -1,5 +1,5 @@
-@import url(https://fonts.googleapis.com/css?family=Roboto:400,500,400italic);
-@import url(https://fonts.googleapis.com/css?family=Roboto+Mono:400,500);
+@import "../app/assets/stylesheets/fonts/roboto";
+@import "../app/assets/stylesheets/fonts/roboto-mono";
 
 #root {
   font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;