Skip to content

Commit bef0725

Browse files
committed
[CALCITE-6843] Self-host Lato font on website due to ASF's content security policy
1 parent 4d3aaac commit bef0725

18 files changed

+134
-1
lines changed

LICENSE

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,3 +194,7 @@ site/_sass/_mixins.scss
194194
site/_sass/_pygments.scss
195195
* normalize:normalize:3.0.2
196196
site/_sass/_normalize.scss
197+
198+
SIL Open Font License
199+
* lato-fonts:lato
200+
site/_sass/_lato.scss

site/_includes/top.html

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
1+
<!--
2+
~ Licensed to the Apache Software Foundation (ASF) under one or more
3+
~ contributor license agreements. See the NOTICE file distributed with
4+
~ this work for additional information regarding copyright ownership.
5+
~ The ASF licenses this file to you under the Apache License, Version 2.0
6+
~ (the "License"); you may not use this file except in compliance with
7+
~ the License. You may obtain a copy of the License at
8+
~
9+
~ http://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
-->
17+
118
<!DOCTYPE HTML>
219
<html lang="en-US">
320
<head>
421
<meta charset="UTF-8">
522
<title>{{ page.title }}</title>
623
<meta name="viewport" content="width=device-width,initial-scale=1">
724
<meta name="generator" content="Jekyll v{{ jekyll.version }}">
8-
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic,900">
925
<link rel="stylesheet" href="{{ site.baseurl }}/css/screen.css">
1026
<link rel="icon" type="image/x-icon" href="{{ site.baseurl }}/favicon.ico">
1127
</head>

site/_sass/_lato.scss

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/* latin-ext */
2+
@font-face {
3+
font-family: 'Lato';
4+
font-style: italic;
5+
font-weight: 300;
6+
src: url('../fonts/lato-italic-300-ext.woff2') format('woff2');
7+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
8+
}
9+
/* latin */
10+
@font-face {
11+
font-family: 'Lato';
12+
font-style: italic;
13+
font-weight: 300;
14+
src: url('../fonts/lato-italic-300.woff2') format('woff2');
15+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
16+
}
17+
/* latin-ext */
18+
@font-face {
19+
font-family: 'Lato';
20+
font-style: italic;
21+
font-weight: 400;
22+
src: url('../fonts/lato-italic-400-ext.woff2') format('woff2');
23+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
24+
}
25+
/* latin */
26+
@font-face {
27+
font-family: 'Lato';
28+
font-style: italic;
29+
font-weight: 400;
30+
src: url('../fonts/lato-italic-400.woff2') format('woff2');
31+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
32+
}
33+
/* latin-ext */
34+
@font-face {
35+
font-family: 'Lato';
36+
font-style: italic;
37+
font-weight: 700;
38+
src: url('../fonts/lato-italic-700-ext.woff2') format('woff2');
39+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
40+
}
41+
/* latin */
42+
@font-face {
43+
font-family: 'Lato';
44+
font-style: italic;
45+
font-weight: 700;
46+
src: url('../fonts/lato-italic-700.woff2') format('woff2');
47+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
48+
}
49+
/* latin-ext */
50+
@font-face {
51+
font-family: 'Lato';
52+
font-style: normal;
53+
font-weight: 300;
54+
src: url('../fonts/lato-300-ext.woff2') format('woff2');
55+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
56+
}
57+
/* latin */
58+
@font-face {
59+
font-family: 'Lato';
60+
font-style: normal;
61+
font-weight: 300;
62+
src: url('../fonts/lato-300.woff2') format('woff2');
63+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
64+
}
65+
/* latin-ext */
66+
@font-face {
67+
font-family: 'Lato';
68+
font-style: normal;
69+
font-weight: 400;
70+
src: url('../fonts/lato-400-ext.woff2') format('woff2');
71+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
72+
}
73+
/* latin */
74+
@font-face {
75+
font-family: 'Lato';
76+
font-style: normal;
77+
font-weight: 400;
78+
src: url('../fonts/lato-400.woff2') format('woff2');
79+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
80+
}
81+
/* latin-ext */
82+
@font-face {
83+
font-family: 'Lato';
84+
font-style: normal;
85+
font-weight: 700;
86+
src: url('../fonts/lato-700-ext.woff2') format('woff2');
87+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
88+
}
89+
/* latin */
90+
@font-face {
91+
font-family: 'Lato';
92+
font-style: normal;
93+
font-weight: 700;
94+
src: url('../fonts/lato-700.woff2') format('woff2');
95+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
96+
}
97+
/* latin-ext */
98+
@font-face {
99+
font-family: 'Lato';
100+
font-style: normal;
101+
font-weight: 900;
102+
src: url('../fonts/lato-900-ext.woff2') format('woff2');
103+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
104+
}
105+
/* latin */
106+
@font-face {
107+
font-family: 'Lato';
108+
font-style: normal;
109+
font-weight: 900;
110+
src: url('../fonts/lato-900.woff2') format('woff2');
111+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
112+
}

site/css/screen.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
@use "gridism";
77
@use "pygments";
88
@use "font-awesome";
9+
@use "lato";
910
@use "style";

site/fonts/lato-300-ext.woff2

5.49 KB
Binary file not shown.

site/fonts/lato-300.woff2

22.7 KB
Binary file not shown.

site/fonts/lato-400-ext.woff2

5.34 KB
Binary file not shown.

site/fonts/lato-400.woff2

23 KB
Binary file not shown.

site/fonts/lato-700-ext.woff2

5.24 KB
Binary file not shown.

site/fonts/lato-700.woff2

22.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)