Skip to content

Commit 7d21f20

Browse files
adamzapbmispelon
authored andcommitted
Remove webfontloader and simplify web fonts
This patch removes the `webfontloader` JavaScript library in favor of using `link` tags to load web font assets. `webfontloader` had its last release in mid-2017, and we were using it in a very simple way. This patch also makes the following related changes: - Remove all font assets other than `woff`, which is widely supported: https://caniuse.com/woff - Flatten font assets into `djangoproject/static/fonts/` - Remove the `FiraMono-Medium` font variant assets since this variant was not being used - Update outdated font-related references in the `styleguide.html` template
1 parent 7bdbdbf commit 7d21f20

File tree

136 files changed

+16
-18947
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+16
-18947
lines changed

bower.json

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"private": true,
44
"dependencies": {
55
"jquery": "<2.0",
6-
"webfontloader": "~1.5.10",
76
"jquery-flot": "~0.8.3"
87
}
98
}

djangoproject/scss/_utils.scss

+3-9
Original file line numberDiff line numberDiff line change
@@ -39,28 +39,22 @@ $red-dark: #6A0E0E;
3939
$red-dark-l10: lighten($red-dark, 10);
4040
$black: #0e1117;
4141
$black-light-5: lighten($black, 5);
42-
$font-path: "../fonts/fira-mono";
42+
$font-path: "../fonts";
4343
$logo-bg-dark: #272c27;
4444

4545

4646
// @font-face declarations
4747

4848
@font-face {
4949
font-family: 'Fira Mono';
50-
src: url('#{$font-path}/FiraMono-Regular.eot');
51-
src: url('#{$font-path}/FiraMono-Regular.eot') format('embedded-opentype'),
52-
url('#{$font-path}/FiraMono-Regular.woff') format('woff'),
53-
url('#{$font-path}/FiraMono-Regular.ttf') format('truetype');
50+
src: url('#{$font-path}/FiraMono-Regular.woff') format('woff');
5451
font-weight: 400;
5552
font-style: normal;
5653
}
5754

5855
@font-face {
5956
font-family: 'Fira Mono';
60-
src: url('#{$font-path}/FiraMono-Bold.eot');
61-
src: url('#{$font-path}/FiraMono-Bold.eot') format('embedded-opentype'),
62-
url('#{$font-path}/FiraMono-Bold.woff') format('woff'),
63-
url('#{$font-path}/FiraMono-Bold.ttf') format('truetype');
57+
src: url('#{$font-path}/FiraMono-Bold.woff') format('woff');
6458
font-weight: 700;
6559
font-style: normal;
6660
}

djangoproject/scss/font-awesome/_path.scss

+1-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,7 @@
33

44
@font-face {
55
font-family: 'FontAwesome';
6-
src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}');
7-
src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'),
8-
url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'),
9-
url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'),
10-
url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg');
11-
//src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts
6+
src: url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff');
127
font-weight: normal;
138
font-style: normal;
149
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

djangoproject/static/fonts/font-awesome/fontawesome-webfont.svg

-520
This file was deleted.
Binary file not shown.

djangoproject/static/js/lib/webfontloader/.bower.json

-14
This file was deleted.

djangoproject/static/js/lib/webfontloader/.gitignore

-6
This file was deleted.

djangoproject/static/js/lib/webfontloader/.travis.yml

-10
This file was deleted.

djangoproject/static/js/lib/webfontloader/AUTHORS

-4
This file was deleted.

djangoproject/static/js/lib/webfontloader/CHANGELOG

-262
This file was deleted.

0 commit comments

Comments
 (0)