Skip to content

Commit 48b77fd

Browse files
committed
Switch to Adwaita fonts as default
Font options (Fixes #294)
1 parent 3ec6015 commit 48b77fd

14 files changed

+325
-15
lines changed

adwaita/css/_root/text.css

+7-11
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
@font-face
2-
{
3-
font-family: "Cantarell-VF";
4-
font-weight: 100 900;
5-
font-display: swap;
6-
font-style: normal;
7-
font-named-instance: "Regular";
8-
src: url("https://steamloopback.host/adwaita/fonts/cantarell/cantarell-vf.otf") format("opentype");
9-
}
10-
111
:root
122
{
13-
--adw-text-font: "Cantarell-VF", "Cantarell", "Noto Sans", "Motiva Sans", Arial, Helvetica, sans-serif;
3+
--adw-text-font-primary: "Adwaita Sans";
4+
--adw-text-font-fallback: "Noto Sans", "Motiva Sans", Arial, Helvetica, sans-serif;
5+
--adw-text-font: var(--adw-text-font-primary), var(--adw-text-font-fallback);
6+
7+
--adw-text-font-monospace-primary: "Adwaita Mono";
8+
--adw-text-font-monospace-fallback: "Consolas", "Lucida Console", monospace;
9+
--adw-text-font-monospace: var(--adw-text-font-monospace-primary), var(--adw-text-font-monospace-fallback);
1410

1511
--adw-text-base-size: 15px;
1612
--adw-text-base-weight: 400;

adwaita/fonts/adwaita/adwaita.css

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
@font-face
2+
{
3+
font-family: "Adwaita Sans";
4+
font-style: normal;
5+
font-weight: 100 900;
6+
src: url("sans/AdwaitaSans-Regular.ttf") format("truetype");
7+
font-display: swap;
8+
}
9+
10+
@font-face
11+
{
12+
font-family: "Adwaita Sans";
13+
font-style: italic;
14+
font-weight: 100 900;
15+
src: url("sans/AdwaitaSans-Italic.ttf") format("truetype");
16+
font-display: swap;
17+
}
18+
19+
@font-face
20+
{
21+
font-family: "Adwaita Mono";
22+
font-style: normal;
23+
font-weight: 400;
24+
src: url("mono/AdwaitaMono-Regular.ttf") format("truetype");
25+
font-display: swap;
26+
}
27+
28+
@font-face
29+
{
30+
font-family: "Adwaita Mono";
31+
font-style: italic;
32+
font-weight: 400;
33+
src: url("mono/AdwaitaMono-Italic.ttf") format("truetype");
34+
font-display: swap;
35+
}
36+
37+
@font-face
38+
{
39+
font-family: "Adwaita Mono";
40+
font-style: normal;
41+
font-weight: 700;
42+
src: url("mono/AdwaitaMono-Bold.ttf") format("truetype");
43+
font-display: swap;
44+
}
45+
46+
@font-face
47+
{
48+
font-family: "Adwaita Mono";
49+
font-style: italic;
50+
font-weight: 700;
51+
src: url("mono/AdwaitaMono-BoldItalic.ttf") format("truetype");
52+
font-display: swap;
53+
}
54+
55+
:root
56+
{
57+
--adw-text-font-primary: "Adwaita Sans" !important;
58+
--adw-text-font-monospace-primary: "Adwaita Mono" !important;
59+
}
1.33 MB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

adwaita/fonts/adwaita/mono/LICENSE.md

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

adwaita/fonts/adwaita/sans/LICENSE.md

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

adwaita/fonts/cantarell/cantarell.css

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@font-face
2+
{
3+
font-family: "Cantarell-VF";
4+
font-style: normal;
5+
font-weight: 100 900;
6+
src: url("cantarell-vf.otf") format("opentype");
7+
font-display: swap;
8+
}
9+
10+
:root
11+
{
12+
--adw-text-font-primary: "Cantarell-VF", "Cantarell" !important;
13+
--adw-text-font-monospace-primary: "Source Code Pro" !important;
14+
}

install.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def generate_windowcontrols(layout: str) -> str:
173173
}}"""
174174
return windowcontrols
175175

176-
def generate_libraryroot(target: Path, extras: list[Path], color_theme: str, windowcontrols_theme: str, windowcontrols_layout: str, custom_css: bool):
176+
def generate_libraryroot(target: Path, extras: list[Path], color_theme: str, font: str, windowcontrols_theme: str, windowcontrols_layout: str, custom_css: bool):
177177
content = "/* Main Files */\n"
178178
for f in LIBRARY_FILES:
179179
content += format_import(STEAM_LOOPBACK_ADWAITA, f)
@@ -197,6 +197,11 @@ def generate_libraryroot(target: Path, extras: list[Path], color_theme: str, win
197197
content += "\n/* Color theme */\n"
198198
content += format_import(STEAM_LOOPBACK_ADWAITA, f"colorthemes/{color_theme}/{color_theme}.css")
199199

200+
if font:
201+
print(f"{TEXT_BLUE}{TEXT_ARROW} Applying font {TEXT_BOLD}{font}{TEXT_RESET}")
202+
content += "\n/* Font */\n"
203+
content += format_import(STEAM_LOOPBACK_ADWAITA, f"fonts/{font}/{font}.css")
204+
200205
if windowcontrols_theme:
201206
print(f"{TEXT_BLUE}{TEXT_ARROW} Applying window controls theme {TEXT_BOLD}{windowcontrols_theme}{TEXT_RESET}")
202207
content += "\n/* Window controls theme */\n"
@@ -298,6 +303,7 @@ def dev_reload(target: Path):
298303

299304
parser = ArgumentParser(description = "Adwaita-for-Steam installer")
300305
parser.add_argument("-c", "--color-theme", default = "adwaita", type = str.lower, help = "Choose color theme")
306+
parser.add_argument("-f", "--font", default = "adwaita", choices = ["adwaita", "cantarell"], type = str.lower, help = "Font")
301307
parser.add_argument("--windowcontrols-theme", default = "auto", choices = ["auto", "adwaita", "windows", "macos"], type = str.lower, help = "Window button theme")
302308
parser.add_argument("--windowcontrols-layout", default = "auto", type = str.lower, help = "Window button positions: 'auto', 'gnome'|'adwaita', 'pantheon'|'elementary', 'windows', 'macos', or GNOME button layout string")
303309
parser.add_argument("--custom-css", action = "store_true", help = "Enable Custom CSS")
@@ -389,7 +395,7 @@ def dev_reload(target: Path):
389395

390396
print(f"{TEXT_BLUE}{TEXT_ARROW} Creating stage directory {TEXT_BOLD}{sourcedir}{TEXT_RESET}")
391397

392-
generate_libraryroot(libraryroot, args.extras, args.color_theme, args.windowcontrols_theme, args.windowcontrols_layout, args.custom_css)
398+
generate_libraryroot(libraryroot, args.extras, args.color_theme, args.font, args.windowcontrols_theme, args.windowcontrols_layout, args.custom_css)
393399

394400
for target in targets:
395401
if not target.is_dir():

skin.json

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Adwaita",
33
"author": "tkashkin",
44
"description": "A skin to make Steam look more like a native GNOME app",
5-
"version": "3.3",
5+
"version": "3.4",
66

77
"github": {
88
"owner": "tkashkin",
@@ -53,6 +53,14 @@
5353
"yaru": { "TargetCss": { "affects": [".*"], "src": "adwaita/colorthemes/yaru/yaru.css" } }
5454
}
5555
},
56+
"Font": {
57+
"description": "Font family",
58+
"default": "Adwaita",
59+
"values": {
60+
"Adwaita": { "TargetCss": { "affects": [".*"], "src": "adwaita/fonts/adwaita/adwaita.css" } },
61+
"Cantarell": { "TargetCss": { "affects": [".*"], "src": "adwaita/fonts/cantarell/cantarell.css" } }
62+
}
63+
},
5664
"Window controls theme": {
5765
"description": "Window control buttons style",
5866
"default": "Adwaita",

0 commit comments

Comments
 (0)