Skip to content

Commit 39cb6ce

Browse files
chore(css): Copy fonts from sentry (#6784)
Also fixes a bad import of fonts in type.scss
1 parent 75b241f commit 39cb6ce

Some content is hidden

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

41 files changed

+207
-21
lines changed

src/css/_includes/type.scss

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,3 @@
1-
@font-face {
2-
font-family: "Rubik";
3-
src: asset-url("Rubik-Medium.ttf") format("truetype");
4-
font-weight: 500;
5-
font-style: normal;
6-
}
7-
8-
@font-face {
9-
font-family: "Rubik";
10-
src: asset-url("Rubik-Italic.ttf") format("truetype");
11-
font-weight: 400;
12-
font-style: italic;
13-
}
14-
15-
@font-face {
16-
font-family: "Rubik";
17-
src: asset-url("Rubik-Regular.ttf") format("truetype");
18-
font-weight: 400;
19-
font-style: normal;
20-
}
21-
221
.prose {
232
h1,
243
h2,

src/fonts/OFL.txt

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
Copyright (c) <dates>, <Copyright Holder> (<URL|email>),
2+
with Reserved Font Name <Reserved Font Name>.
3+
Copyright (c) <dates>, <additional Copyright Holder> (<URL|email>),
4+
with Reserved Font Name <additional Reserved Font Name>.
5+
Copyright (c) <dates>, <additional Copyright Holder> (<URL|email>).
6+
7+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
8+
This license is copied below, and is also available with a FAQ at:
9+
http://scripts.sil.org/OFL
10+
11+
12+
-----------------------------------------------------------
13+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
14+
-----------------------------------------------------------
15+
16+
PREAMBLE
17+
The goals of the Open Font License (OFL) are to stimulate worldwide
18+
development of collaborative font projects, to support the font creation
19+
efforts of academic and linguistic communities, and to provide a free and
20+
open framework in which fonts may be shared and improved in partnership
21+
with others.
22+
23+
The OFL allows the licensed fonts to be used, studied, modified and
24+
redistributed freely as long as they are not sold by themselves. The
25+
fonts, including any derivative works, can be bundled, embedded,
26+
redistributed and/or sold with any software provided that any reserved
27+
names are not used by derivative works. The fonts and derivatives,
28+
however, cannot be released under any other type of license. The
29+
requirement for fonts to remain under this license does not apply
30+
to any document created using the fonts or their derivatives.
31+
32+
DEFINITIONS
33+
"Font Software" refers to the set of files released by the Copyright
34+
Holder(s) under this license and clearly marked as such. This may
35+
include source files, build scripts and documentation.
36+
37+
"Reserved Font Name" refers to any names specified as such after the
38+
copyright statement(s).
39+
40+
"Original Version" refers to the collection of Font Software components as
41+
distributed by the Copyright Holder(s).
42+
43+
"Modified Version" refers to any derivative made by adding to, deleting,
44+
or substituting -- in part or in whole -- any of the components of the
45+
Original Version, by changing formats or by porting the Font Software to a
46+
new environment.
47+
48+
"Author" refers to any designer, engineer, programmer, technical
49+
writer or other person who contributed to the Font Software.
50+
51+
PERMISSION & CONDITIONS
52+
Permission is hereby granted, free of charge, to any person obtaining
53+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
54+
redistribute, and sell modified and unmodified copies of the Font
55+
Software, subject to the following conditions:
56+
57+
1) Neither the Font Software nor any of its individual components,
58+
in Original or Modified Versions, may be sold by itself.
59+
60+
2) Original or Modified Versions of the Font Software may be bundled,
61+
redistributed and/or sold with any software, provided that each copy
62+
contains the above copyright notice and this license. These can be
63+
included either as stand-alone text files, human-readable headers or
64+
in the appropriate machine-readable metadata fields within text or
65+
binary files as long as those fields can be easily viewed by the user.
66+
67+
3) No Modified Version of the Font Software may use the Reserved Font
68+
Name(s) unless explicit written permission is granted by the corresponding
69+
Copyright Holder. This restriction only applies to the primary font name as
70+
presented to the users.
71+
72+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
73+
Software shall not be used to promote, endorse or advertise any
74+
Modified Version, except to acknowledge the contribution(s) of the
75+
Copyright Holder(s) and the Author(s) or with their explicit written
76+
permission.
77+
78+
5) The Font Software, modified or unmodified, in part or in whole,
79+
must be distributed entirely under this license, and must not be
80+
distributed under any other license. The requirement for fonts to
81+
remain under this license does not apply to any document created
82+
using the Font Software.
83+
84+
TERMINATION
85+
This license becomes null and void if any of the above conditions are
86+
not met.
87+
88+
DISCLAIMER
89+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
90+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
91+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
92+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
93+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
94+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
95+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
96+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
97+
OTHER DEALINGS IN THE FONT SOFTWARE.

src/fonts/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Notes
2+
3+
The fonts in this folder have been optimized for web rendering. There are two notable modifications: vertical metrics and file size. Before making any changes to these files, ensure that the metrics are correct and the files are properly minimized.
4+
5+
## Vertical metrics
6+
7+
For historical reasons, font files include three different sets of metrics (`win`, `typo`, and `hhea`). These metrics have been modified to standardize rendering across operating systems and browsers.
8+
9+
The modified metrics are:
10+
11+
- `win` ascent: 840
12+
- `win` descent: 250
13+
- `typo` ascent: 840
14+
- `typo` descent: -250
15+
- `hhea` ascent: 935
16+
- `hhea` descent: -230
17+
18+
## File size
19+
20+
These files have been reprocessed using [FontSquirrel's Webfont Generator](https://www.fontsquirrel.com/tools/webfont-generator) to reduce their size. Note that the default Optimal option will remove certain useful font features and settings. Before processing, select the Expert option, and change the following:
21+
22+
- **Vertical metrics:** no adjustment
23+
- **Opentype features:** keep all features
24+
- **Subsetting:** custom subsetting – read more below
25+
26+
### Subsetting
27+
28+
Subsetting narrows the list of glyphs (characters) included in the exported font files. We split our fonts into files with different glyph sets, each defined by a [unicode range](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/unicode-range). This way, we can serve only the files with the glyphs that the user needs. If the page contains only latin characters, then the browser will only download the file with latin glyphs (e.g. `/rubik-regular-latin.woff2`). But if the page also has cyrillic text, then the browser will additionally download the file with cyrillic glyphs (e.g. `/rubik-regular-cyrillic.woff2`). This split reduces the total font loading time, since only the relevant glyph sets are downloaded.
29+
30+
We support four glyph sets: `latin`, `latin-ext`, `cyrillic`, and `cyrillic-ext`. The unicode ranges for each of these sets can be found in [Google Fonts' Rubik stylesheet](https://fonts.googleapis.com/css2?family=Rubik&display=swap). In FontSquirrel's Webfont Generator, copy and paste these ranges into Subsetting -> Custom Subsetting -> Unicode Ranges. Once everything has been exported, check that each file contains the correct glyphs using [FontDrop](https://fontdrop.info/).
17.2 KB
Binary file not shown.
13.1 KB
Binary file not shown.
10.2 KB
Binary file not shown.
7.77 KB
Binary file not shown.
16.9 KB
Binary file not shown.
12.5 KB
Binary file not shown.

src/fonts/roboto-mono-medium.woff

17.9 KB
Binary file not shown.

src/fonts/roboto-mono-medium.woff2

13.8 KB
Binary file not shown.
16.9 KB
Binary file not shown.
12.9 KB
Binary file not shown.
10.2 KB
Binary file not shown.
7.81 KB
Binary file not shown.
16.7 KB
Binary file not shown.
12.3 KB
Binary file not shown.

src/fonts/roboto-mono-regular.woff

-30.6 KB
Binary file not shown.

src/fonts/roboto-mono-regular.woff2

-22.1 KB
Binary file not shown.
11 KB
Binary file not shown.
8.46 KB
Binary file not shown.

src/fonts/rubik-medium-cyrillic.woff

13 KB
Binary file not shown.

src/fonts/rubik-medium-cyrillic.woff2

10 KB
Binary file not shown.

src/fonts/rubik-medium-latin-ext.woff

17.9 KB
Binary file not shown.
13.8 KB
Binary file not shown.

src/fonts/rubik-medium.woff

29.8 KB
Binary file not shown.

src/fonts/rubik-medium.woff2

-27 KB
Binary file not shown.
10.9 KB
Binary file not shown.
8.34 KB
Binary file not shown.

src/fonts/rubik-regular-cyrillic.woff

12.9 KB
Binary file not shown.
10.1 KB
Binary file not shown.
17.7 KB
Binary file not shown.
13.7 KB
Binary file not shown.

src/fonts/rubik-regular.woff

29.7 KB
Binary file not shown.

src/fonts/rubik-regular.woff2

-26.4 KB
Binary file not shown.

src/fonts/sentry-simple.eot

13.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)