Skip to content

Commit b2beb28

Browse files
committed
fix(ui): self-host Google Fonts to eliminate third-party dependency
Replace the runtime @import of Google Fonts with self-hosted woff2 files served from public/fonts/. This removes the external network dependency and prevents leaking client metadata (IP, user-agent, referrer) to third-party origins, improving CSP compatibility and privacy. - Bundle Poppins (weights 100-600) and Roboto Mono (400) as woff2 - Add @font-face declarations pointing to local files - Remove the Google Fonts @import - Include OFL license file for bundled fonts Relates to #6292 Signed-off-by: Yomi <yomi@users.noreply.github.com>
1 parent da48a59 commit b2beb28

File tree

9 files changed

+67
-1
lines changed

9 files changed

+67
-1
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
The font files in this directory are licensed under the SIL Open Font License, Version 1.1.
2+
3+
Poppins
4+
Copyright 2020 The Poppins Project Authors (https://github.com/itfoundry/Poppins)
5+
License: https://fonts.google.com/specimen/Poppins/license
6+
7+
Roboto Mono
8+
Copyright 2015 The Roboto Mono Project Authors (https://github.com/googlefonts/RobotoMono)
9+
License: https://fonts.google.com/specimen/Roboto+Mono/license
10+
11+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
12+
https://openfontlicense.org
44.7 KB
Binary file not shown.
48.1 KB
Binary file not shown.
48.3 KB
Binary file not shown.
48.5 KB
Binary file not shown.
47.9 KB
Binary file not shown.
48.4 KB
Binary file not shown.
12.4 KB
Binary file not shown.

ui/packages/app/web/src/style/profile.css

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,58 @@
1-
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&family=Roboto+Mono&display=swap');
1+
@font-face {
2+
font-family: 'Poppins';
3+
font-style: normal;
4+
font-weight: 100;
5+
font-display: swap;
6+
src: url('/fonts/poppins-100.woff2') format('woff2');
7+
}
8+
9+
@font-face {
10+
font-family: 'Poppins';
11+
font-style: normal;
12+
font-weight: 200;
13+
font-display: swap;
14+
src: url('/fonts/poppins-200.woff2') format('woff2');
15+
}
16+
17+
@font-face {
18+
font-family: 'Poppins';
19+
font-style: normal;
20+
font-weight: 300;
21+
font-display: swap;
22+
src: url('/fonts/poppins-300.woff2') format('woff2');
23+
}
24+
25+
@font-face {
26+
font-family: 'Poppins';
27+
font-style: normal;
28+
font-weight: 400;
29+
font-display: swap;
30+
src: url('/fonts/poppins-400.woff2') format('woff2');
31+
}
32+
33+
@font-face {
34+
font-family: 'Poppins';
35+
font-style: normal;
36+
font-weight: 500;
37+
font-display: swap;
38+
src: url('/fonts/poppins-500.woff2') format('woff2');
39+
}
40+
41+
@font-face {
42+
font-family: 'Poppins';
43+
font-style: normal;
44+
font-weight: 600;
45+
font-display: swap;
46+
src: url('/fonts/poppins-600.woff2') format('woff2');
47+
}
48+
49+
@font-face {
50+
font-family: 'Roboto Mono';
51+
font-style: normal;
52+
font-weight: 400;
53+
font-display: swap;
54+
src: url('/fonts/roboto-mono-400.woff2') format('woff2');
55+
}
256

357
.profile-search-bar .queryExpressionInput {
458
box-shadow: none;

0 commit comments

Comments
 (0)