Skip to content

Commit

Permalink
all: swap out Montserrat with Sora
Browse files Browse the repository at this point in the history
  • Loading branch information
arnemolland committed Oct 27, 2023
1 parent ea9d0b4 commit 60d931f
Show file tree
Hide file tree
Showing 17 changed files with 39 additions and 48 deletions.
2 changes: 1 addition & 1 deletion example/lib/pages/foundation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ class FoundationBanner extends StatelessWidget {
),
),
const Expanded(
child: Text('Montserrat'),
child: Text('Sora'),
),
const Expanded(
child: Text('Mulish'),
Expand Down
7 changes: 2 additions & 5 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,9 @@ flutter:
fonts:
- asset: packages/flume/fonts/FlumeIcons.ttf

- family: Montserrat
- family: Sora
fonts:
- asset: packages/flume/fonts/MontserratMedium.ttf
weight: 500
- asset: packages/flume/fonts/MontserratSemiBold.ttf
weight: 600
- asset: packages/flume/fonts/Sora.ttf # variable font

- family: Mulish
fonts:
Expand Down
Binary file removed lib/fonts/MontserratMedium.ttf
Binary file not shown.
Binary file removed lib/fonts/MontserratSemiBold.ttf
Binary file not shown.
Binary file added lib/fonts/Sora.ttf
Binary file not shown.
6 changes: 3 additions & 3 deletions lib/licenses.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import 'package:flutter/services.dart' show rootBundle;
const _kLicenseRoot = 'packages/flume/lib/licenses';

Stream<LicenseEntry> licenses() async* {
final montserrat = await rootBundle.loadString(
'$_kLicenseRoot/Montserrat.txt',
final sora = await rootBundle.loadString(
'$_kLicenseRoot/Sora.txt',
);
final mulish = await rootBundle.loadString(
'$_kLicenseRoot/Mulish.txt',
);

yield LicenseEntryWithLineBreaks(<String>['Montserrat'], montserrat);
yield LicenseEntryWithLineBreaks(<String>['Sora'], sora);
yield LicenseEntryWithLineBreaks(<String>['Mulish'], mulish);
}
8 changes: 4 additions & 4 deletions lib/licenses/Montserrat.txt → lib/licenses/Sora.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Copyright 2011 The Montserrat Project Authors (https://github.com/JulietaUla/Montserrat)
Copyright 2019 The Sora Project Authors (https://github.com/sora-xor/sora-font)

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL

This license is copied below, and is also available with a FAQ at: https://scripts.sil.org/OFL


-----------------------------------------------------------
Expand Down Expand Up @@ -71,7 +71,7 @@ Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part '../fonts/licenses'or in whole,
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
Expand Down
20 changes: 10 additions & 10 deletions lib/src/foundation/typography.dart
Original file line number Diff line number Diff line change
Expand Up @@ -200,35 +200,35 @@ class FlumeTypography {
fontSize: 24,
fontWeight: FontWeight.w600,
lineHeight: 1.2,
fontFamily: 'Montserrat',
fontFamily: 'Sora',
package: 'flume',
),
header2: FlumeTypographyData(
fontSize: 18,
fontWeight: FontWeight.w600,
lineHeight: 1.2,
fontFamily: 'Montserrat',
fontFamily: 'Sora',
package: 'flume',
),
header3: FlumeTypographyData(
fontSize: 16,
fontWeight: FontWeight.w600,
lineHeight: 1.2,
fontFamily: 'Montserrat',
fontFamily: 'Sora',
package: 'flume',
),
header4: FlumeTypographyData(
fontSize: 14,
fontWeight: FontWeight.w600,
lineHeight: 1.2,
fontFamily: 'Montserrat',
fontFamily: 'Sora',
package: 'flume',
),
header5: FlumeTypographyData(
fontSize: 14,
fontWeight: FontWeight.w600,
lineHeight: 1.2,
fontFamily: 'Montserrat',
fontFamily: 'Sora',
package: 'flume',
),
body1: FlumeTypographyData(
Expand Down Expand Up @@ -256,35 +256,35 @@ class FlumeTypography {
fontSize: 14,
fontWeight: FontWeight.w700,
lineHeight: 1.142,
fontFamily: 'Montserrat',
fontFamily: 'Sora',
package: 'flume',
),
link: FlumeTypographyData(
fontSize: 14,
fontWeight: FontWeight.w600,
lineHeight: 1.2,
fontFamily: 'Montserrat',
fontFamily: 'Sora',
package: 'flume',
),
label1: FlumeTypographyData(
fontSize: 12,
fontWeight: FontWeight.w600,
lineHeight: 1.1,
fontFamily: 'Montserrat',
fontFamily: 'Sora',
package: 'flume',
),
label2: FlumeTypographyData(
fontSize: 11,
fontWeight: FontWeight.w600,
lineHeight: 1.1,
fontFamily: 'Montserrat',
fontFamily: 'Sora',
package: 'flume',
),
label3: FlumeTypographyData(
fontSize: 10,
fontWeight: FontWeight.w600,
lineHeight: 1.1,
fontFamily: 'Montserrat',
fontFamily: 'Sora',
package: 'flume',
),
);
Expand Down
9 changes: 3 additions & 6 deletions www/docs/getting-started/importing-assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@ flutter:
fonts:
- asset: packages/flume/fonts/FlumeIcons.ttf

- family: Montserrat
- family: Sora
fonts:
- asset: packages/flume/fonts/MontserratMedium.ttf
weight: 500
- asset: packages/flume/fonts/MontserratSemiBold.ttf
weight: 600
- asset: packages/flume/fonts/Sora.ttf

- family: Mulish
fonts:
Expand All @@ -28,5 +25,5 @@ flutter:
```
:::tip
Alternatively, use the [google_fonts](https://pub.dev/packages/google_fonts) package to avoid manually importing the Montserrat and Mulish fonts.
Alternatively, use the [google_fonts](https://pub.dev/packages/google_fonts) package to avoid manually importing the Sora and Mulish fonts.
:::
8 changes: 4 additions & 4 deletions www/docs/getting-started/licenses.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ sidebar_position: 5

# 📜 Licenses

Flutter automatically registers the licenses used by all your packages in its [_LicenseRegistry_](https://api.flutter.dev/flutter/foundation/LicenseRegistry-class.html). However, Flume re-distributes assets subject to their own licenses. If you choose to use the bundled _Mulish_ and/or _Montserrat_ fonts, you need to register the fonts' licenses as well:
Flutter automatically registers the licenses used by all your packages in its [_LicenseRegistry_](https://api.flutter.dev/flutter/foundation/LicenseRegistry-class.html). However, Flume re-distributes assets subject to their own licenses. If you choose to use the bundled _Mulish_ and/or _Sora_ fonts, you need to register the fonts' licenses as well:

```dart {5}
import 'package:flume/licenses.dart';
void main() {
// Registers both Mulish and Montserrat font licenses
// Registers both Mulish and Sora font licenses
LicenseRegistry.addLicense(licenses);
runApp(Placeholder());
}
Expand All @@ -23,9 +23,9 @@ Or, alternatively, generate yourself:
void main() {
LicenseRegistry.addLicense(() async* {
final mulish = await rootBundle.loadString('packages/flume/lib/licenses/Mulish.txt');
final montserrat = await rootBundle.loadString('packages/flume/lib/licenses/Montserrat.txt');
final sora = await rootBundle.loadString('packages/flume/lib/licenses/Sora.txt');
yield LicenseEntryWithLineBreaks(<String>['Montserrat'], montserrat);
yield LicenseEntryWithLineBreaks(<String>['Sora'], sora);
yield LicenseEntryWithLineBreaks(<String>['Mulish'], mulish);
});
}
Expand Down
27 changes: 12 additions & 15 deletions www/src/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
/** Montserrat Medium **/
/** Sora Regular **/
@font-face {
font-family: 'Montserrat';
font-family: 'Sora';
font-weight: 500;
font-style: normal;
src: url('/fonts/Montserrat-Medium.woff2') format('woff2');
src: url('/fonts/Sora-Regular.woff2') format('woff2');
font-display: swap;
}

/** Montserrat SemiBold **/
/** Sora SemiBold **/
@font-face {
font-family: 'Montserrat';
font-family: 'Sora';
font-weight: 600;
font-style: normal;
src: url('/fonts/Montserrat-SemiBold.woff2') format('woff2');
src: url('/fonts/Sora-SemiBold.woff2') format('woff2');
font-display: swap;
}

/** Montserrat Bold **/
/** Sora Bold **/
@font-face {
font-family: 'Montserrat';
font-family: 'Sora';
font-weight: 700;
font-style: normal;
src: url('/fonts/Montserrat-Bold.woff2') format('woff2');
src: url('/fonts/Sora-Bold.woff2') format('woff2');
font-display: swap;
}

Expand Down Expand Up @@ -137,8 +137,7 @@
font-family: theme('fontFamily.header');
font-size: theme('fontSize.header-5');
font-weight: theme('fontWeight.semibold');
transition: theme('transitionDuration.medium')
theme('transitionTimingFunction.default');
transition: theme('transitionDuration.medium') theme('transitionTimingFunction.default');
}

.navbar__link:hover {
Expand All @@ -155,13 +154,11 @@
width: 24px;
height: 24px;
display: flex;
background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")
no-repeat;
background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat;
}

html[data-theme='dark'] .navbar-github-icon:before {
background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")
no-repeat;
background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat;
}

.navbar-gameflow-icon:hover {
Expand Down
Binary file removed www/static/fonts/Montserrat-Bold.woff2
Binary file not shown.
Binary file removed www/static/fonts/Montserrat-Medium.woff2
Binary file not shown.
Binary file removed www/static/fonts/Montserrat-SemiBold.woff2
Binary file not shown.
Binary file added www/static/fonts/Sora-Bold.woff2
Binary file not shown.
Binary file added www/static/fonts/Sora-Regular.woff2
Binary file not shown.
Binary file added www/static/fonts/Sora-SemiBold.woff2
Binary file not shown.

0 comments on commit 60d931f

Please sign in to comment.