Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: fontFamily and fontWeight are not optional on Android #10

Open
s20208413 opened this issue Jun 20, 2018 · 1 comment
Open

BUG: fontFamily and fontWeight are not optional on Android #10

s20208413 opened this issue Jun 20, 2018 · 1 comment

Comments

@s20208413
Copy link

s20208413 commented Jun 20, 2018

You said fontFamily and fontWeight are optional in README.md, but it will crash without these 2 options on Android.

I must write

var result = await MeasureText.widths({
  texts: ['test'],
  fontSize: 25,
  height: 60,

  fontFamily: null,  // without this, it will crash
  fontWeight: '',  // without this, it will crash
});

to get it to work.

This will crash:

var result = await MeasureText.widths({
  texts: ['test'],
  fontSize: 25,
  height: 60,
  // without `fontFamily` and `fontWeight` here
});

Versions

  • react-native: 0.55.4
  • react-native-measure-text: 1.0.0-beta
@s20208413 s20208413 changed the title BUG: fontFamily and fontSize are not optional on Android BUG: fontFamily and fontWeight are not optional on Android Jun 20, 2018
@airamrguez
Copy link
Owner

@sceext2 thanks for reporting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants