Skip to content

Commit

Permalink
fix: [MDS-664] Update icon font and MDS text font (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kypsis committed Sep 6, 2023
1 parent 666f8e5 commit 95aed8e
Show file tree
Hide file tree
Showing 8 changed files with 4,950 additions and 4,669 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ final lightTokens = MoonTokens.light.copyWith(
textPrimary: Colors.amber,
),
typography: MoonTypography.typography.copyWith(
heading: MoonTypography.typography.heading.apply(fontFamily: "KumbhSans"),
heading: MoonTypography.typography.heading.apply(fontFamily: "DMSans"),
),
);
Expand Down
Binary file added example/assets/DMSans.ttf
Binary file not shown.
30 changes: 30 additions & 0 deletions example/lib/src/storybook/common/icons/icons_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ final List<IconData> iconsList = [
MoonIcons.add_text_16,
MoonIcons.add_text_24,
MoonIcons.add_text_32,
MoonIcons.agent_16,
MoonIcons.agent_24,
MoonIcons.agent_32,
MoonIcons.airplane_16,
MoonIcons.airplane_24,
MoonIcons.airplane_32,
Expand Down Expand Up @@ -734,6 +737,9 @@ final List<IconData> iconsList = [
MoonIcons.play_16,
MoonIcons.play_24,
MoonIcons.play_32,
MoonIcons.player_16,
MoonIcons.player_24,
MoonIcons.player_32,
MoonIcons.plug_eur_16,
MoonIcons.plug_eur_24,
MoonIcons.plug_eur_32,
Expand Down Expand Up @@ -1046,9 +1052,18 @@ final List<IconData> iconsList = [
MoonIcons.water_16,
MoonIcons.water_24,
MoonIcons.water_32,
MoonIcons.water_temperature_16,
MoonIcons.water_temperature_24,
MoonIcons.water_temperature_32,
MoonIcons.waves_16,
MoonIcons.waves_24,
MoonIcons.waves_32,
MoonIcons.wi_fi_16,
MoonIcons.wi_fi_24,
MoonIcons.wi_fi_32,
MoonIcons.wind_16,
MoonIcons.wind_24,
MoonIcons.wind_32,
MoonIcons.wireless_pay_16,
MoonIcons.wireless_pay_24,
MoonIcons.wireless_pay_32,
Expand Down Expand Up @@ -1170,6 +1185,9 @@ final List<String> iconsNameList = [
"add_text_16",
"add_text_24",
"add_text_32",
"agent_16",
"agent_24",
"agent_32",
"airplane_16",
"airplane_24",
"airplane_32",
Expand Down Expand Up @@ -1887,6 +1905,9 @@ final List<String> iconsNameList = [
"play_16",
"play_24",
"play_32",
"player_16",
"player_24",
"player_32",
"plug_eur_16",
"plug_eur_24",
"plug_eur_32",
Expand Down Expand Up @@ -2199,9 +2220,18 @@ final List<String> iconsNameList = [
"water_16",
"water_24",
"water_32",
"water_temperature_16",
"water_temperature_24",
"water_temperature_32",
"waves_16",
"waves_24",
"waves_32",
"wi_fi_16",
"wi_fi_24",
"wi_fi_32",
"wind_16",
"wind_24",
"wind_32",
"wireless_pay_16",
"wireless_pay_24",
"wireless_pay_32",
Expand Down
30 changes: 26 additions & 4 deletions example/lib/src/storybook/storybook.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,32 @@ class StorybookPage extends StatelessWidget {
brandingWidget: const MoonVersionWidget(),
wrapperBuilder: (context, child) => MaterialApp(
title: "Moon Design for Flutter",
theme:
ThemeData.light().copyWith(extensions: <ThemeExtension<dynamic>>[MoonTheme(tokens: MoonTokens.light)]),
darkTheme:
ThemeData.dark().copyWith(extensions: <ThemeExtension<dynamic>>[MoonTheme(tokens: MoonTokens.dark)]),
theme: ThemeData.light().copyWith(
extensions: <ThemeExtension<dynamic>>[
MoonTheme(
tokens: MoonTokens.light.copyWith(
typography: MoonTypography.typography.copyWith(
heading: MoonTypography.typography.heading.apply(fontFamily: "DMSans"),
body: MoonTypography.typography.body.apply(fontFamily: "DMSans"),
caption: MoonTypography.typography.caption.apply(fontFamily: "DMSans"),
),
),
),
],
),
darkTheme: ThemeData.dark().copyWith(
extensions: <ThemeExtension<dynamic>>[
MoonTheme(
tokens: MoonTokens.dark.copyWith(
typography: MoonTypography.typography.copyWith(
heading: MoonTypography.typography.heading.apply(fontFamily: "DMSans"),
body: MoonTypography.typography.body.apply(fontFamily: "DMSans"),
caption: MoonTypography.typography.caption.apply(fontFamily: "DMSans"),
),
),
),
],
),
home: Directionality(
textDirection: Directionality.of(context),
child: Focus(
Expand Down
4 changes: 4 additions & 0 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ dev_dependencies:
path: packages/storybook_flutter
flutter:
uses-material-design: true
fonts:
- family: DMSans
fonts:
- asset: assets/DMSans.ttf
assets:
- assets/images/
- assets/svg/
Binary file modified fonts/MoonIcons.ttf
Binary file not shown.
7,264 changes: 3,737 additions & 3,527 deletions fonts/config.json

Large diffs are not rendered by default.

2,289 changes: 1,152 additions & 1,137 deletions lib/src/widgets/common/icons/icons.dart

Large diffs are not rendered by default.

0 comments on commit 95aed8e

Please sign in to comment.