From 9f20fe67afa31868587e9a59c41c19673a31c986 Mon Sep 17 00:00:00 2001 From: s-ol Date: Tue, 24 May 2022 11:37:09 +0200 Subject: static/style: serve fonts locally --- root/static/style/$order | 1 + root/static/style/fonts/code_400: font$woff.woff | Bin 0 -> 12772 bytes root/static/style/fonts/code_400: font$woff2.woff2 | Bin 0 -> 9960 bytes root/static/style/fonts/sans_200: font$woff.woff | Bin 0 -> 25164 bytes root/static/style/fonts/sans_200: font$woff2.woff2 | Bin 0 -> 19636 bytes root/static/style/fonts/sans_400: font$woff.woff | Bin 0 -> 26096 bytes root/static/style/fonts/sans_400: font$woff2.woff2 | Bin 0 -> 20496 bytes root/static/style/fonts/sans_400_i: font$woff.woff | Bin 0 -> 25716 bytes .../style/fonts/sans_400_i: font$woff2.woff2 | Bin 0 -> 20212 bytes root/static/style/fonts/sans_600: font$woff.woff | Bin 0 -> 26008 bytes root/static/style/fonts/sans_600: font$woff2.woff2 | Bin 0 -> 20300 bytes .../text$moonscript -> fn -> text$x-scss.moon | 47 +++++++++++++++++++++ root/static/style/reset/text$x-scss.scss | 3 +- 13 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 root/static/style/fonts/code_400: font$woff.woff create mode 100644 root/static/style/fonts/code_400: font$woff2.woff2 create mode 100644 root/static/style/fonts/sans_200: font$woff.woff create mode 100644 root/static/style/fonts/sans_200: font$woff2.woff2 create mode 100644 root/static/style/fonts/sans_400: font$woff.woff create mode 100644 root/static/style/fonts/sans_400: font$woff2.woff2 create mode 100644 root/static/style/fonts/sans_400_i: font$woff.woff create mode 100644 root/static/style/fonts/sans_400_i: font$woff2.woff2 create mode 100644 root/static/style/fonts/sans_600: font$woff.woff create mode 100644 root/static/style/fonts/sans_600: font$woff2.woff2 create mode 100644 root/static/style/fonts/text$moonscript -> fn -> text$x-scss.moon (limited to 'root/static') diff --git a/root/static/style/$order b/root/static/style/$order index 655aac7..29c97ca 100644 --- a/root/static/style/$order +++ b/root/static/style/$order @@ -1,3 +1,4 @@ +fonts defs reset header diff --git a/root/static/style/fonts/code_400: font$woff.woff b/root/static/style/fonts/code_400: font$woff.woff new file mode 100644 index 0000000..5a12ef5 Binary files /dev/null and b/root/static/style/fonts/code_400: font$woff.woff differ diff --git a/root/static/style/fonts/code_400: font$woff2.woff2 b/root/static/style/fonts/code_400: font$woff2.woff2 new file mode 100644 index 0000000..6fec74d Binary files /dev/null and b/root/static/style/fonts/code_400: font$woff2.woff2 differ diff --git a/root/static/style/fonts/sans_200: font$woff.woff b/root/static/style/fonts/sans_200: font$woff.woff new file mode 100644 index 0000000..7ee1a93 Binary files /dev/null and b/root/static/style/fonts/sans_200: font$woff.woff differ diff --git a/root/static/style/fonts/sans_200: font$woff2.woff2 b/root/static/style/fonts/sans_200: font$woff2.woff2 new file mode 100644 index 0000000..01147e4 Binary files /dev/null and b/root/static/style/fonts/sans_200: font$woff2.woff2 differ diff --git a/root/static/style/fonts/sans_400: font$woff.woff b/root/static/style/fonts/sans_400: font$woff.woff new file mode 100644 index 0000000..b6f56cf Binary files /dev/null and b/root/static/style/fonts/sans_400: font$woff.woff differ diff --git a/root/static/style/fonts/sans_400: font$woff2.woff2 b/root/static/style/fonts/sans_400: font$woff2.woff2 new file mode 100644 index 0000000..1916745 Binary files /dev/null and b/root/static/style/fonts/sans_400: font$woff2.woff2 differ diff --git a/root/static/style/fonts/sans_400_i: font$woff.woff b/root/static/style/fonts/sans_400_i: font$woff.woff new file mode 100644 index 0000000..3c990ae Binary files /dev/null and b/root/static/style/fonts/sans_400_i: font$woff.woff differ diff --git a/root/static/style/fonts/sans_400_i: font$woff2.woff2 b/root/static/style/fonts/sans_400_i: font$woff2.woff2 new file mode 100644 index 0000000..14388eb Binary files /dev/null and b/root/static/style/fonts/sans_400_i: font$woff2.woff2 differ diff --git a/root/static/style/fonts/sans_600: font$woff.woff b/root/static/style/fonts/sans_600: font$woff.woff new file mode 100644 index 0000000..ce90d3a Binary files /dev/null and b/root/static/style/fonts/sans_600: font$woff.woff differ diff --git a/root/static/style/fonts/sans_600: font$woff2.woff2 b/root/static/style/fonts/sans_600: font$woff2.woff2 new file mode 100644 index 0000000..82b6c92 Binary files /dev/null and b/root/static/style/fonts/sans_600: font$woff2.woff2 differ diff --git a/root/static/style/fonts/text$moonscript -> fn -> text$x-scss.moon b/root/static/style/fonts/text$moonscript -> fn -> text$x-scss.moon new file mode 100644 index 0000000..30419c2 --- /dev/null +++ b/root/static/style/fonts/text$moonscript -> fn -> text$x-scss.moon @@ -0,0 +1,47 @@ +import tourl from (require "mmm.mmmfs.util") require "mmm.dom" + +=> + link_font = (name) -> + "url('#{tourl @path, "#{name}: font/woff2"}') format('woff2'), url('#{tourl @path, "#{name}: font/woff"}') format('woff')" + + " + /* source-sans-pro-200 - latin-ext_latin */ + @font-face { + font-family: 'Source Sans Pro'; + font-style: normal; + font-weight: 200; + src: local(''), #{link_font "sans_200"}; + } + + /* source-sans-pro-regular - latin-ext_latin */ + @font-face { + font-family: 'Source Sans Pro'; + font-style: normal; + font-weight: 400; + src: local(''), #{link_font "sans_400"}; + } + + /* source-sans-pro-italic - latin-ext_latin */ + @font-face { + font-family: 'Source Sans Pro'; + font-style: italic; + font-weight: 400; + src: local(''), #{link_font "sans_400i"}; + } + + /* source-sans-pro-600 - latin-ext_latin */ + @font-face { + font-family: 'Source Sans Pro'; + font-style: normal; + font-weight: 600; + src: local(''), #{link_font "sans_600"}; + } + + /* source-code-pro-regular - latin */ + @font-face { + font-family: 'Source Code Pro'; + font-style: normal; + font-weight: 400; + src: local(''), #{link_font "code_400"}; + } + " diff --git a/root/static/style/reset/text$x-scss.scss b/root/static/style/reset/text$x-scss.scss index d157fcf..7537bd9 100644 --- a/root/static/style/reset/text$x-scss.scss +++ b/root/static/style/reset/text$x-scss.scss @@ -7,6 +7,7 @@ -moz-osx-font-smoothing: grayscale; } +body { font-family: 'Source Sans Pro'; } body, html, h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; @@ -24,7 +25,7 @@ input, select, button { color: graytext; } } -tt, code, kbd, samp { font-family: monospace; } +tt, code, kbd, samp { font-family: 'Source Code Pro', monospace; } code { font-size: 0.8em; } b, strong { font-weight: bold; } em, i { font-style: italic; } -- cgit v1.2.3