AnalogIO / coffeecard_app

Cross-platform coffee card app for Cafe Analog
https://www.cafeanalog.dk/app
MIT License
6 stars 1 forks source link

Use variable font; Build text styles with `TextStyleBuilder` #367

Closed marfavi closed 1 year ago

marfavi commented 2 years ago

Default font for app changed to Roboto Flex. Beforehand, the app would use Roboto on Android and SF UI on iOS. We wanted to use SF Pro Display/Text on iOS for its different optical sizes, but this has proven impossible to achieve on Material-based Flutter apps. Instead, we will use the variable font Roboto Flex to achieve fluid optical sizing on both platforms.

Due to the new font's flexibility (heh) we create presets of the font for heading and body text, just like how SF Pro has a Display and Text variant. As a result, app font now matches the design spec pretty closely.

A new TextStyleBuilder class will handle setting variable font axes depending on if the text style is for heading or body text.

misc: AppTextStyle.medium renamed to AppTextStyle.botomNavBarLabel

misc: SectionTitle now uses AppTextStyle.sectionTitle text style.

codecov[bot] commented 2 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (develop@b0f4238). Click here to learn what that means. The diff coverage is n/a.

@@            Coverage Diff             @@
##             develop     #367   +/-   ##
==========================================
  Coverage           ?   38.77%           
==========================================
  Files              ?       55           
  Lines              ?      766           
  Branches           ?        0           
==========================================
  Hits               ?      297           
  Misses             ?      469           
  Partials           ?        0           
Flag Coverage Δ
unittests 38.77% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lib/base/strings.dart 0.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.