Skip to content

Commit 531cc0d

Browse files
committed
Update to rebrand fonts (except Monaco, for now)
Monaco has some ongoing problems with layout with non-default fonts, notable with both broken word wrapping (goes slightly too far) and weird relayout of text when big chunks are selected. Enabling ligatures & doing remeasure slightly helps in the Settings UI case maybe, but not in normal editors. Needs proper investigation.
1 parent 4fecaa3 commit 531cc0d

19 files changed

+85
-135
lines changed

automation/webpack.common.ts

-11
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import * as path from 'path';
22
import * as Webpack from 'webpack';
33

44
import HtmlWebpackPlugin from 'html-webpack-plugin';
5-
import GoogleFontsPlugin from '@beyonk/google-fonts-webpack-plugin';
65
import CopyPlugin from 'copy-webpack-plugin';
76
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
87
import ForkTsCheckerNotifierWebpackPlugin from 'fork-ts-checker-notifier-webpack-plugin';
@@ -165,16 +164,6 @@ export default <Webpack.Configuration>{
165164
'wordOperations'
166165
]
167166
}),
168-
new GoogleFontsPlugin({
169-
fonts: [
170-
{ family: "Fira Mono" },
171-
{ family: "Lato" }
172-
],
173-
path: '.',
174-
formats: ['woff2'], // Supported by Chrome, FF, Edge, Safari 12+
175-
filename: 'fonts.css',
176-
apiUrl: 'https://gwfh.mranftl.com/api/fonts'
177-
}),
178167
new Webpack.ProvidePlugin({
179168
'process': 'process/browser.js',
180169
'Buffer': ['buffer', 'Buffer']

package-lock.json

+33-104
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
},
3535
"dependencies": {
3636
"@ethersproject/abi": "^5.7.0",
37+
"@fontsource/dm-mono": "^5.0.19",
38+
"@fontsource/dm-sans": "^5.0.20",
39+
"@fontsource/saira": "^5.0.27",
3740
"@fortawesome/fontawesome-svg-core": "^1.2.27",
3841
"@fortawesome/free-brands-svg-icons": "^5.12.1",
3942
"@fortawesome/free-regular-svg-icons": "^5.12.1",
@@ -144,7 +147,6 @@
144147
"yaml": "^1.7.2"
145148
},
146149
"devDependencies": {
147-
"@beyonk/google-fonts-webpack-plugin": "^1.7.0",
148150
"@types/chai": "^4.1.7",
149151
"@types/chai-as-promised": "^7.1.0",
150152
"@types/chai-enzyme": "^0.6.6",

src/amiusing.html

+6-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
padding: 8px;
2323

2424
background-color: #d8e2e6;
25-
font-family: Lato;
25+
font-family: "DM Sans", Arial, sans-serif;
26+
letter-spacing: -0.5px;
2627
line-height: 1.3;
2728
display: flex;
2829
flex-direction: column;
@@ -35,11 +36,12 @@
3536
}
3637

3738
h1 {
38-
font-size: 36pt;
39+
font-size: 48px;
40+
letter-spacing: -2px;
3941
}
4042

4143
p {
42-
font-size: 18pt;
44+
font-size: 24px;
4345
}
4446

4547
.logo {
@@ -62,6 +64,6 @@ <h1>You're being intercepted by HTTP Toolkit</h1>
6264
that brought you this page, or start browsing elsewhere to collect more data.
6365
</p>
6466
</div>
65-
<link href="https://fonts.googleapis.com/css?family=Lato&display=block" rel="stylesheet" />
67+
<link href="https://fonts.cdnfonts.com/css/dm-sans" rel="stylesheet">
6668
</body>
6769
</html>

src/components/account/plan-picker.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ const PlanPickerDetails = styled.section`
4949

5050
const PlanPickerHeading = styled.h1`
5151
font-size: ${p => p.theme.loudHeadingSize};
52+
font-family: ${p => p.theme.titleTextFamily};
5253
font-weight: bold;
5354
letter-spacing: -1px;
5455
text-align: center;
@@ -117,6 +118,8 @@ const PlanPickerButtons = styled.div`
117118
`;
118119

119120
const PlanSecondaryButton = styled(SecondaryButton)`
121+
letter-spacing: -0.5px;
122+
120123
&:not(:last-child) {
121124
margin-bottom: 10px;
122125
}
@@ -170,13 +173,14 @@ const PricingTier = styled.section<{ highlighted?: boolean }>`
170173
`}
171174
`;
172175

173-
const TierHeader = styled.div`
176+
const TierHeader = styled.h2`
174177
width: 100%;
175178
padding: 30px 0;
176179
color: ${p => p.theme.popColor};
177180
text-align: center;
178181
font-weight: bold;
179182
font-size: ${p => p.theme.loudHeadingSize};
183+
font-family: ${p => p.theme.titleTextFamily};
180184
`;
181185

182186
const TierPriceBlock = styled.div`

src/components/common/card.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ export const MediumCard = styled(Card)`
104104
padding: 20px;
105105
margin-bottom: 20px;
106106
107+
> header h1, > h1 {
108+
font-family: ${p => p.theme.titleTextFamily};
109+
}
110+
107111
> header, > h1 {
108112
text-transform: uppercase;
109113
text-align: ${p => p.headerAlignment};

src/components/common/empty-state.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ export const EmptyState = styled((props: React.HTMLAttributes<HTMLDivElement> &
2727
align-items: center;
2828
justify-content: center;
2929
30-
color: ${props => props.theme.containerWatermark};
31-
font-size: 40px;
30+
color: ${p => p.theme.containerWatermark};
31+
font-size: ${p => p.theme.loudHeadingSize};
32+
letter-spacing: -1px;
33+
3234
text-align: center;
3335
3436
box-sizing: border-box;

src/components/common/pill.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function getDefaultColor(theme: Theme) {
4040
const pillStyles = css`
4141
display: inline-block;
4242
border-radius: 4px;
43-
padding: 4px 8px;
43+
padding: 5px 8px 3px;
4444
4545
text-align: center;
4646
text-transform: none;
@@ -80,7 +80,7 @@ const Select = styled(Pill.withComponent('select'))`
8080
border: none;
8181
8282
height: 24px;
83-
padding: 0 4px 3px 8px;
83+
padding: 0 4px 0 8px;
8484
8585
font-size: ${p => p.theme.textSize};
8686
font-family: ${p => p.theme.fontFamily};

src/components/common/text-content.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { fromMarkdown } from '../../model/ui/markdown';
99

1010
export const ContentLabel = styled.h2`
1111
text-transform: uppercase;
12+
font-family: ${p => p.theme.titleTextFamily};
1213
opacity: ${p => p.theme.lowlightTextOpacity};
1314
1415
display: inline-block;

src/components/error-boundary.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const ErrorOverlay = styled((props: {
3434
3535
h1 {
3636
font-size: ${p => p.theme.screamingHeadingSize};
37+
font-family: ${p => p.theme.titleTextFamily};
3738
font-weight: bold;
3839
margin-bottom: 50px;
3940
}

src/components/intercept/intercept-option.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ const InterceptOptionCard = styled(LittleCard)<{
118118
z-index: 1;
119119
}
120120
121+
h1 {
122+
font-family: ${p => p.theme.titleTextFamily};
123+
}
124+
121125
> h1:not(:last-child) {
122126
margin-bottom: 10px; /* Override LittleCard default */
123127
}

0 commit comments

Comments
 (0)