Skip to content

Commit

Permalink
revert font family for keypad buttons
Browse files Browse the repository at this point in the history
NotoSansMath appears to be better vertically centered on the keypad than
NotoSans. This is especially noticeable when the font size is increased
in the system settings.
  • Loading branch information
mwageringel committed Aug 15, 2022
1 parent 431e855 commit 5731e13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ Iterable<A> interleave<A>(Iterable<A> it, A separator) {
const listPadding = EdgeInsets.all(8.0);
const _biggerFont = TextStyle(fontSize: 18.0);
final _biggerFontMath = _biggerFont.copyWith(fontFamily: 'NotoSansMath', fontFamilyFallback: ['NotoSans']);
final _biggerFontMathButton = _biggerFontMath.copyWith(fontSize: 20.0); // NotoSansMath appears to be better vertically centered than NotoSans

class KeyboardButton extends StatelessWidget {
static const _keyIcons = {
Expand All @@ -303,7 +304,7 @@ class KeyboardButton extends StatelessWidget {
height: 44,
width: 66,
child: OutlinedButton(
child: _keyIcons.containsKey(label) ? Icon(_keyIcons[label], size: 26) : Text(label, style: const TextStyle(fontSize: 20)),
child: _keyIcons.containsKey(label) ? Icon(_keyIcons[label], size: 26) : Text(label, style: _biggerFontMathButton),
onPressed: () => game.keyPressed(label),
),
),
Expand Down

0 comments on commit 5731e13

Please sign in to comment.