Skip to content

Commit 7d84d21

Browse files
committed
improv: switch to Open Sans and Noto Sans Mono, with tweaked text styles
1 parent 3f25af8 commit 7d84d21

18 files changed

+206
-72
lines changed

res/Fira/FiraMono-Regular.otf

-123 KB
Binary file not shown.

res/Fira/FiraSans-Bold.otf

-299 KB
Binary file not shown.

res/Fira/FiraSans-Light.otf

-351 KB
Binary file not shown.

res/Fira/FiraSans-Regular.otf

-350 KB
Binary file not shown.

res/Fira/FiraSans-SemiBold.otf

-359 KB
Binary file not shown.

res/Fira/SIL Open Font License.txt

Lines changed: 0 additions & 48 deletions
This file was deleted.

res/noto/LICENSE

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

res/noto/NotoSansMono-Bold.ttf

511 KB
Binary file not shown.

res/noto/NotoSansMono-Regular.ttf

499 KB
Binary file not shown.

res/open-sans/LICENSE

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

res/open-sans/OpenSans-Bold.ttf

219 KB
Binary file not shown.

res/open-sans/OpenSans-ExtraBold.ttf

217 KB
Binary file not shown.

res/open-sans/OpenSans-Light.ttf

217 KB
Binary file not shown.

res/open-sans/OpenSans-Regular.ttf

212 KB
Binary file not shown.

res/open-sans/OpenSans-Semibold.ttf

216 KB
Binary file not shown.

src/app/mod.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,11 +1019,13 @@ fn single_instance_subscription<App: ApplicationExt>() -> Subscription<Message<A
10191019
}
10201020

10211021
const EMBEDDED_FONTS: &[&[u8]] = &[
1022-
include_bytes!("../../res/Fira/FiraSans-Light.otf"),
1023-
include_bytes!("../../res/Fira/FiraSans-Regular.otf"),
1024-
include_bytes!("../../res/Fira/FiraSans-SemiBold.otf"),
1025-
include_bytes!("../../res/Fira/FiraSans-Bold.otf"),
1026-
include_bytes!("../../res/Fira/FiraMono-Regular.otf"),
1022+
include_bytes!("../../res/open-sans/OpenSans-Light.ttf"),
1023+
include_bytes!("../../res/open-sans/OpenSans-Regular.ttf"),
1024+
include_bytes!("../../res/open-sans/OpenSans-Semibold.ttf"),
1025+
include_bytes!("../../res/open-sans/OpenSans-Bold.ttf"),
1026+
include_bytes!("../../res/open-sans/OpenSans-ExtraBold.ttf"),
1027+
include_bytes!("../../res/noto/NotoSansMono-Regular.ttf"),
1028+
include_bytes!("../../res/noto/NotoSansMono-Bold.ttf"),
10271029
];
10281030

10291031
fn preload_fonts() {

src/config/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ use std::sync::{LazyLock, Mutex, RwLock};
1313
/// ID for the `CosmicTk` config.
1414
pub const ID: &str = "com.system76.CosmicTk";
1515

16-
const MONO_FAMILY_DEFAULT: &str = "Fira Mono";
17-
const SANS_FAMILY_DEFAULT: &str = "Fira Sans";
16+
const MONO_FAMILY_DEFAULT: &str = "Noto Sans Mono";
17+
const SANS_FAMILY_DEFAULT: &str = "Open Sans";
1818

1919
/// Stores static strings of the family names for `iced::Font` compatibility.
2020
pub static FAMILY_MAP: LazyLock<Mutex<BTreeSet<&'static str>>> = LazyLock::new(|| Mutex::default());

src/widget/text.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,64 +27,64 @@ pub enum Typography {
2727
/// [`Text`] widget with the Title 1 typography preset.
2828
pub fn title1<'a>(text: impl Into<Cow<'a, str>> + 'a) -> Text<'a, crate::Theme, Renderer> {
2929
Text::new(text.into())
30-
.size(32.0)
31-
.line_height(LineHeight::Absolute(44.0.into()))
32-
.font(crate::font::light())
30+
.size(35.0)
31+
.line_height(LineHeight::Absolute(52.0.into()))
32+
.font(crate::font::semibold())
3333
}
3434

3535
/// [`Text`] widget with the Title 2 typography preset.
3636
pub fn title2<'a>(text: impl Into<Cow<'a, str>> + 'a) -> Text<'a, crate::Theme, Renderer> {
3737
Text::new(text.into())
38-
.size(28.0)
39-
.line_height(LineHeight::Absolute(36.0.into()))
40-
.font(crate::font::default())
38+
.size(29.0)
39+
.line_height(LineHeight::Absolute(43.0.into()))
40+
.font(crate::font::semibold())
4141
}
4242

4343
/// [`Text`] widget with the Title 3 typography preset.
4444
pub fn title3<'a>(text: impl Into<Cow<'a, str>> + 'a) -> Text<'a, crate::Theme, Renderer> {
4545
Text::new(text.into())
4646
.size(24.0)
47-
.line_height(LineHeight::Absolute(32.0.into()))
48-
.font(crate::font::default())
47+
.line_height(LineHeight::Absolute(36.0.into()))
48+
.font(crate::font::bold())
4949
}
5050

5151
/// [`Text`] widget with the Title 4 typography preset.
5252
pub fn title4<'a>(text: impl Into<Cow<'a, str>> + 'a) -> Text<'a, crate::Theme, Renderer> {
5353
Text::new(text.into())
5454
.size(20.0)
55-
.line_height(LineHeight::Absolute(28.0.into()))
56-
.font(crate::font::default())
55+
.line_height(LineHeight::Absolute(30.0.into()))
56+
.font(crate::font::bold())
5757
}
5858

5959
/// [`Text`] widget with the Heading typography preset.
6060
pub fn heading<'a>(text: impl Into<Cow<'a, str>> + 'a) -> Text<'a, crate::Theme, Renderer> {
6161
Text::new(text.into())
6262
.size(14.0)
63-
.line_height(LineHeight::Absolute(iced::Pixels(20.0)))
64-
.font(crate::font::semibold())
63+
.line_height(LineHeight::Absolute(iced::Pixels(21.0)))
64+
.font(crate::font::bold())
6565
}
6666

6767
/// [`Text`] widget with the Caption Heading typography preset.
6868
pub fn caption_heading<'a>(text: impl Into<Cow<'a, str>> + 'a) -> Text<'a, crate::Theme, Renderer> {
6969
Text::new(text.into())
70-
.size(10.0)
71-
.line_height(LineHeight::Absolute(iced::Pixels(14.0)))
70+
.size(12.0)
71+
.line_height(LineHeight::Absolute(iced::Pixels(17.0)))
7272
.font(crate::font::semibold())
7373
}
7474

7575
/// [`Text`] widget with the Body typography preset.
7676
pub fn body<'a>(text: impl Into<Cow<'a, str>> + 'a) -> Text<'a, crate::Theme, Renderer> {
7777
Text::new(text.into())
7878
.size(14.0)
79-
.line_height(LineHeight::Absolute(20.0.into()))
79+
.line_height(LineHeight::Absolute(21.0.into()))
8080
.font(crate::font::default())
8181
}
8282

8383
/// [`Text`] widget with the Caption typography preset.
8484
pub fn caption<'a>(text: impl Into<Cow<'a, str>> + 'a) -> Text<'a, crate::Theme, Renderer> {
8585
Text::new(text.into())
86-
.size(10.0)
87-
.line_height(LineHeight::Absolute(14.0.into()))
86+
.size(12.0)
87+
.line_height(LineHeight::Absolute(17.0.into()))
8888
.font(crate::font::default())
8989
}
9090

0 commit comments

Comments
 (0)