diff --git a/Makefile b/Makefile
index 74b7bac..0e19ce4 100644
--- a/Makefile
+++ b/Makefile
@@ -61,13 +61,19 @@ icons-clean:
rm -f assets/launcher_icon.png assets/launcher_icon_adaptive.png
# fonts are downloaded and bundled into the app
-fonts: fonts/NotoSansMath-Regular.ttf
+fonts: fonts/NotoSansMath-Regular.ttf fonts/NotoSans-Regular.ttf
fonts/NotoSansMath-Regular.ttf: | build/upstream/Noto_Sans_Math.zip
mkdir -p fonts/
unzip -o build/upstream/Noto_Sans_Math.zip -d fonts/
build/upstream/Noto_Sans_Math.zip:
mkdir -p build/upstream/
curl --output build/upstream/Noto_Sans_Math.zip https://fonts.google.com/download?family=Noto%20Sans%20Math
-.INTERMEDIATE: build/upstream/Noto_Sans_Math.zip
+fonts/NotoSans-Regular.ttf: | build/upstream/Noto_Sans.zip
+ mkdir -p fonts/
+ unzip -o build/upstream/Noto_Sans.zip -d fonts/
+build/upstream/Noto_Sans.zip:
+ mkdir -p build/upstream/
+ curl --output build/upstream/Noto_Sans.zip https://fonts.google.com/download?family=Noto%20Sans
+.INTERMEDIATE: build/upstream/Noto_Sans_Math.zip build/upstream/Noto_Sans.zip
.PHONY: all app web gh-pages host run test assets-android assets-web fonts icons-android icons-fdroid icons-web icons-clean clean
diff --git a/lib/main.dart b/lib/main.dart
index 73e4937..be43280 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -160,7 +160,7 @@ class QuestionsWidget extends StatelessWidget {
if (j != -1) {
t = Text.rich(TextSpan(
text: q.substring(0, j),
- style: _biggerFont,
+ style: _biggerFontMath,
children: [
// TextSpan(text: q.substring(j, j+1), style: TextStyle(backgroundColor: Theme.of(context).focusColor)),
WidgetSpan( // with padding
@@ -170,7 +170,7 @@ class QuestionsWidget extends StatelessWidget {
color: Theme.of(context).focusColor,
borderRadius: const BorderRadius.all(Radius.circular(3.0)),
),
- child: Text(q.substring(j, j+1), style: _biggerFont),
+ child: Text(q.substring(j, j+1), style: _biggerFontMath),
),
),
TextSpan(text: q.substring(j+1)),
@@ -178,7 +178,7 @@ class QuestionsWidget extends StatelessWidget {
));
}
}
- t ??= Text(q, style: _biggerFont);
+ t ??= Text(q, style: _biggerFontMath);
return ListTile(
title: t,
trailing: (i == questions.length - 1) ? StatusIcon(status, animateStatusWrong: animateStatusWrong) : null,
@@ -266,6 +266,7 @@ Iterable interleave(Iterable it, A separator) {
const listPadding = EdgeInsets.all(8.0);
const _biggerFont = TextStyle(fontSize: 18.0);
+final _biggerFontMath = _biggerFont.copyWith(fontFamily: 'NotoSansMath', fontFamilyFallback: ['NotoSans']);
class KeyboardButton extends StatelessWidget {
static const _keyIcons = {
@@ -644,7 +645,7 @@ class MyApp extends StatelessWidget {
title: appName,
themeMode: world.themeMode,
theme: FlexThemeData.light(
- fontFamily: 'NotoSansMath',
+ fontFamily: 'NotoSans',
scheme: FlexScheme.materialBaseline,
primary: Colors.indigo,
surfaceMode: FlexSurfaceMode.highScaffoldLowSurface,
@@ -657,7 +658,7 @@ class MyApp extends StatelessWidget {
visualDensity: FlexColorScheme.comfortablePlatformDensity,
),
darkTheme: FlexThemeData.dark(
- fontFamily: 'NotoSansMath',
+ fontFamily: 'NotoSans',
scheme: FlexScheme.materialBaseline,
primary: Colors.indigoAccent, // better contrast against dark background
surfaceMode: FlexSurfaceMode.highScaffoldLowSurface,
@@ -728,7 +729,7 @@ void main() async {
LicenseRegistry.addLicense(() async* {
final license = await rootBundle.loadString('fonts/OFL.txt');
- yield LicenseEntryWithLineBreaks(['NotoSansMath'], license);
+ yield LicenseEntryWithLineBreaks(['NotoSansMath', 'NotoSans'], license);
});
Future loadGameState(Game game) async {
diff --git a/pubspec.yaml b/pubspec.yaml
index 7103901..9a3be18 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -104,9 +104,12 @@ flutter:
- family: NotoSansMath
fonts:
- asset: fonts/NotoSansMath-Regular.ttf
+ - family: NotoSans
+ fonts:
+ - asset: fonts/NotoSans-Regular.ttf
assets:
- # license for NotoSansMath
+ # license for Noto fonts
- fonts/OFL.txt
flutter_icons: