Skip to content

Commit 1302ca7

Browse files
committed
move a couple of fonts to npm packages
1 parent cabd5ea commit 1302ca7

30 files changed

Lines changed: 33 additions & 702 deletions

app/assets/stylesheets/lato-fonts.css

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,54 +2,34 @@
22
font-family: 'Lato';
33
font-style: normal;
44
font-weight: 300;
5-
src: local('Lato Light'), local('Lato-Light');
6-
src: url('/fonts/lato/Lato-Light.eot'); /* IE9 Compat Modes */
7-
src: url('/fonts/lato/Lato-Light.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
8-
url('/fonts/lato/Lato-Light.woff2') format('woff2'), /* Modern Browsers */
9-
url('/fonts/lato/Lato-Light.woff') format('woff'), /* Modern Browsers */
10-
url('/fonts/lato/Lato-Light.ttf') format('truetype');
5+
src: url('lato-latin-300-normal.woff2') format('woff2'),
6+
url('lato-latin-300-normal.woff') format('woff');
117
}
128
@font-face {
139
font-family: 'Lato';
1410
font-style: normal;
1511
font-weight: 400;
16-
src: local('Lato Regular'), local('Lato-Regular');
17-
src: url('/fonts/lato/Lato-Regular.eot'); /* IE9 Compat Modes */
18-
src: url('/fonts/lato/Lato-Regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
19-
url('/fonts/lato/Lato-Regular.woff2') format('woff2'), /* Modern Browsers */
20-
url('/fonts/lato/Lato-Regular.woff') format('woff'), /* Modern Browsers */
21-
url('/fonts/lato/Lato-Regular.ttf') format('truetype');
12+
src: url('lato-latin-400-normal.woff2') format('woff2'),
13+
url('lato-latin-400-normal.woff') format('woff');
2214
}
2315
@font-face {
2416
font-family: 'Lato';
2517
font-style: normal;
2618
font-weight: 700;
27-
src: local('Lato Bold'), local('Lato-Bold');
28-
src: url('/fonts/lato/Lato-Bold.eot'); /* IE9 Compat Modes */
29-
src: url('/fonts/lato/Lato-Bold.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
30-
url('/fonts/lato/Lato-Bold.woff2') format('woff2'), /* Modern Browsers */
31-
url('/fonts/lato/Lato-Bold.woff') format('woff'), /* Modern Browsers */
32-
url('/fonts/lato/Lato-Bold.ttf') format('truetype');
19+
src: url('lato-latin-700-normal.woff2') format('woff2'),
20+
url('lato-latin-700-normal.woff') format('woff');
3321
}
3422
@font-face {
3523
font-family: 'Lato';
3624
font-style: normal;
3725
font-weight: 900;
38-
src: local('Lato Black'), local('Lato-Black');
39-
src: url('/fonts/lato/Lato-Black.eot'); /* IE9 Compat Modes */
40-
src: url('/fonts/lato/Lato-Black.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
41-
url('/fonts/lato/Lato-Black.woff2') format('woff2'), /* Modern Browsers */
42-
url('/fonts/lato/Lato-Black.woff') format('woff'), /* Modern Browsers */
43-
url('/fonts/lato/Lato-Black.ttf') format('truetype');
26+
src: url('lato-latin-900-normal.woff2') format('woff2'),
27+
url('lato-latin-900-normal.woff') format('woff');
4428
}
4529
@font-face {
4630
font-family: 'Lato';
4731
font-style: italic;
4832
font-weight: 400;
49-
src: local('Lato Italic'), local('Lato-Italic');
50-
src: url('/fonts/lato/Lato-Italic.eot'); /* IE9 Compat Modes */
51-
src: url('/fonts/lato/Lato-Italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
52-
url('/fonts/lato/Lato-Italic.woff2') format('woff2'), /* Modern Browsers */
53-
url('/fonts/lato/Lato-Italic.woff') format('woff'), /* Modern Browsers */
54-
url('/fonts/lato/Lato-Italic.ttf') format('truetype');
33+
src: url('lato-latin-400-italic.woff2') format('woff2'),
34+
url('lato-latin-400-italic.woff') format('woff');
5535
}

app/assets/stylesheets/reenie-beanie-font.css

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
font-family: 'Reenie Beanie';
33
font-style: normal;
44
font-weight: 400;
5-
src: local('Reenie Beanie'), local('ReenieBeanie');
6-
src: url('/fonts/reenie-beanie/ReenieBeanie.eot?#iefix') format('embedded-opentype'),
7-
url('/fonts/reenie-beanie/ReenieBeanie.woff2') format('woff2'),
8-
url('/fonts/reenie-beanie/ReenieBeanie.woff') format('woff'),
9-
url('/fonts/reenie-beanie/ReenieBeanie.ttf') format('truetype'),
10-
url('/fonts/reenie-beanie/ReenieBeanie.svg#ReenieBeanie') format('svg');
5+
src: url('reenie-beanie-latin-400-normal.woff2') format('woff2'),
6+
url('reenie-beanie-latin-400-normal.woff') format('woff');
117
}

config/initializers/assets.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@
1313
Rails.root.join("node_modules/jquery"),
1414
Rails.root.join("node_modules/mousetrap"),
1515
Rails.root.join("node_modules/underscore"),
16-
Rails.root.join("node_modules/jquery-visible")
16+
Rails.root.join("node_modules/jquery-visible"),
17+
Rails.root.join("node_modules/@fontsource/lato/files"),
18+
Rails.root.join("node_modules/@fontsource/reenie-beanie/files")
1719
]

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
"stylelint": "stylelint 'app/assets/stylesheets/**/*.css'"
66
},
77
"dependencies": {
8+
"@fontsource/lato": "^5.2.7",
9+
"@fontsource/reenie-beanie": "^5.2.8",
810
"backbone": "1.0.0",
911
"bootstrap": "3.1.1",
1012
"jquery": "1.9.1",

pnpm-lock.yaml

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/fonts/lato/Lato-Black.eot

-239 KB
Binary file not shown.

public/fonts/lato/Lato-Black.ttf

-570 KB
Binary file not shown.

public/fonts/lato/Lato-Black.woff

-290 KB
Binary file not shown.

public/fonts/lato/Lato-Black.woff2

-173 KB
Binary file not shown.

public/fonts/lato/Lato-Bold.eot

-250 KB
Binary file not shown.

0 commit comments

Comments
 (0)