department-of-veterans-affairs / va-mobile-library

https://department-of-veterans-affairs.github.io/va-mobile-library/
ISC License
1 stars 0 forks source link

BUG - Sev-3 - [Android] - Unable to load fonts from npm module #98

Closed narin closed 7 months ago

narin commented 8 months ago

What happened?

Font loading from node_modules using expo-font seems to be broken on Android and requires a the fonts to exist in a local directory.

Specs:

Steps to Reproduce

  1. Delete fonts folder packages/components/src/assets/fonts
  2. Try to reload app. There will be an error saying that the font could not be found.

Desired behavior

Fonts should load from node_module on Android without error

Acceptance Criteria

Bug Severity - BE SURE TO ADD THE SEVERITY LABEL

See [Bug Tracking](https://department-of-veterans-affairs.github.io/va-mobile-app/docs/QA#issue-severity) for details on severity levels

Linked to Story

Screen shot(s) and additional information

Error: ENOENT: no such file or directory, scandir '/Users/narin/dev/va-mobile-library/packages/components/fonts/SourceSansPro'
Error: ENOENT: no such file or directory, scandir '/Users/narin/dev/va-mobile-library/packages/components/fonts/SourceSansPro'
 ERROR  fontFamily "SourceSansPro-Bold" is not a system font and has not been loaded through Font.loadAsync.

- If you intended to use a system font, make sure you typed the name correctly and that it is supported by your device operating system.

- If this is a custom font, be sure to load it with Font.loadAsync. 

Ticket Checklist