diff --git a/assets/RobotoMono.ttf b/assets/RobotoMono.ttf new file mode 100644 index 0000000..fc02de4 Binary files /dev/null and b/assets/RobotoMono.ttf differ diff --git a/lib/ui/device_page.dart b/lib/ui/device_page.dart index 1af9bdd..9ac2d43 100644 --- a/lib/ui/device_page.dart +++ b/lib/ui/device_page.dart @@ -21,14 +21,6 @@ class HexTable extends StatelessWidget { @override Widget build(BuildContext context) { - final monoStyle = Theme.of(context).textTheme.bodyMedium?.copyWith( - fontFeatures: const [ - // TODO: does not apply to letters, use a full mono font? - FontFeature.tabularFigures(), - FontFeature.slashedZero() - ], - ); - final chunks = hex.splitByLength(charsPerCell).toList(); assert(width > 1); final height = (chunks.length + 1) ~/ width; @@ -42,7 +34,7 @@ class HexTable extends StatelessWidget { Center( child: Text( chunks[y * width + x], - style: monoStyle, + style: const TextStyle(fontFamily: 'RobotoMono'), ), ) ]) diff --git a/lib/ui/search_peer_page.dart b/lib/ui/search_peer_page.dart index c47ecd5..bbc878c 100644 --- a/lib/ui/search_peer_page.dart +++ b/lib/ui/search_peer_page.dart @@ -90,12 +90,8 @@ class DeviceSuggestionTile extends StatelessWidget { softWrap: false, overflow: TextOverflow.fade, style: TextStyle( - color: Theme.of(context).colorScheme.onSurface.withOpacity(.3), - // TODO: does not apply to letters, use a full mono font? - fontFeatures: const [ - FontFeature.tabularFigures(), - FontFeature.slashedZero() - ], + color: Theme.of(context).colorScheme.onSurface.withOpacity(.26), + fontFamily: 'RobotoMono', ), ), ); diff --git a/pubspec.yaml b/pubspec.yaml index b4fe736..e69bbae 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -92,22 +92,7 @@ flutter: # For details regarding adding assets from package dependencies, see # https://flutter.dev/assets-and-images/#from-packages - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages + fonts: + - family: RobotoMono + fonts: + - asset: assets/RobotoMono.ttf