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

contentOptions.labelStyle - fontFamily is not applied #2822

Closed
r0st1kuzh opened this issue Oct 25, 2017 · 7 comments
Closed

contentOptions.labelStyle - fontFamily is not applied #2822

r0st1kuzh opened this issue Oct 25, 2017 · 7 comments

Comments

@r0st1kuzh
Copy link

fontFamily property is not applied to the labelStyle.
Meanwhile, color is.

@kelset
Copy link

kelset commented Oct 25, 2017

  1. please follow the issue template when creating an issue (next time I'll close it right away)
  2. does it happen for both Android & iOS? chances are that the font has a different family name on the two platforms
  3. have you tested the font in other portions of the app? Does it appear there?
  4. which version are you using?

@r0st1kuzh
Copy link
Author

  1. Ok, got it. Sorry about that.
  2. Android only. If seems like it defaults to Roboto. I am using the same font which I use in the application. It is showing ok in regular components. I was able to override Drawer Item with getLabel={(scene) => { but it is not the best way I think
  3. Yes. All works
  4. "^1.0.0-beta.15",

@r0st1kuzh
Copy link
Author

Also, when I am specifying headerTitleStyle in the navigationOptions: ({ navigation }) => ({
it also is not applied and defaults to Roboto on Android. On the iOs all works as expected

@r0st1kuzh
Copy link
Author

r0st1kuzh commented Oct 25, 2017

Android 6.0.1
Nexus 5

@kelset
Copy link

kelset commented Oct 25, 2017

Ok, if it works in other portions of the app then my guess is that it's related to the weight of the font in the header.

Can you try adding something like: fontWeight: Device.isIOS ? '600' : 'normal', to the options you pass to the header?

Again, it's probably related to how Android "digests" the font you provided it with.

@r0st1kuzh
Copy link
Author

Thank you. The issue is resolved when I specified fontWeight: 'normal' for Android. This can be closed.

@kelset kelset closed this as completed Oct 25, 2017
@adamnator92
Copy link

@kelset it worked for me too! thank you.

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

No branches or pull requests

3 participants