Font families and typography

Font files, registered family names, and theme references must agree. The inspected pubspec.yaml registers Montserrat-Arabic, while Constants.fontFamily currently says Montserrat; review this mismatch when preparing your branded release.

Add your font

  1. Confirm that your font license allows your intended distribution.
  2. Put the font files under assets/fonts/.
  3. Register the family and available weights in pubspec.yaml.
  4. Set Constants.fontFamily to the exact registered family name.
  5. Review lib/core/utils/styles.dart and the light/dark themes for overrides.

Example registration:

fonts:
- family: YourBrandFont
fonts:
- asset: assets/fonts/YourBrandFont-Regular.ttf
weight: 400
- asset: assets/fonts/YourBrandFont-Bold.ttf
weight: 700

Place this under the existing flutter: section; do not create a second conflicting section. Run flutter pub get and rebuild after changing font assets.

Verify readability

Test headings, buttons, currency amounts, dates, and multiline descriptions. Check all supported writing systems, particularly Arabic, and verify that characters are not replaced by missing-glyph boxes.

Use the weights supplied by the font rather than assuming every weight exists. Also test increased device text size so your typography change does not hide controls or clip content.

Write Your Comment