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

Fix text font on Android #182

Closed
artyorsh opened this issue Jun 14, 2019 · 12 comments · Fixed by #254
Closed

Fix text font on Android #182

artyorsh opened this issue Jun 14, 2019 · 12 comments · Fixed by #254
Assignees
Labels
bug layout indicates changes in layout examples ui kitten indicates an issue which is potentially related to UI Kitten

Comments

@artyorsh
Copy link
Collaborator

Reported in #181

@artyorsh artyorsh added bug layout indicates changes in layout examples ui kitten indicates an issue which is potentially related to UI Kitten labels Jun 18, 2019
@ImAbhishekTomar
Copy link

Maybe, this is react native issue and I have some information about this, why this is happing..

If Text component has bold CSS property without any default font family and view flex direction row then this is happy because some Android phones forcefully applying your phone UI default theme like OOPO and Vivo. I have to face the same issue with my app.

Check this time 53:06 link

@artyorsh
Copy link
Collaborator Author

Thank you for the video @iamabhishektomar 👍

@ImAbhishekTomar
Copy link

Same issue with Facebook market place.
C615C07D-E13B-4903-9231-5534646B2DDC
3687619A-F262-4F3C-9BF7-90D39E3DFBD8

@artyorsh
Copy link
Collaborator Author

Same issue with Facebook market place.

This means it should be fixed soon 😄

@ImAbhishekTomar
Copy link

Anyone found any temp fix for this issue?
#181 (comment)

@artyorsh
Copy link
Collaborator Author

artyorsh commented Jun 20, 2019

In context of Kitten Tricks app, you can modify text styles with following code

{
  headline: {
    fontFamily: 'opensans-bold',
    fontWeight: 'normal',
  },
  subtitle: {
    fontFamily: 'opensans-semibold',
    fontWeight: 'normal',
  },
  paragraph: {
    fontFamily: 'opensans-regular',
    fontWeight: 'normal',
  },
  caption1: {
    fontFamily: 'opensans-regular',
    fontWeight: 'normal',
  },
  caption2: {
    fontFamily: 'opensans-semibold',
    fontWeight: 'normal',
  },
  label: {
    fontFamily: 'opensans-bold',
    fontWeight: 'normal',
  },
}

This will explicitly set fontWeight back to normal, so the text should look practically the same because we apply bold and semibold fonts where needed

@deounix
Copy link

deounix commented Jun 24, 2019

@artyorsh if there's no special features (used by kitten) only exist in expo sdk 33.0.0 just downgrade to 31.0.6

This error related to react-native itself (react-native > 0.57.8) now I'm using 0.57.8 every thing work 100%

expo sdk change log

expo sdk 31.0.6 --> uses react-native 0.57.1 so it should work 100%

@artyorsh
Copy link
Collaborator Author

Thanks for the details @deounix
So that means this doesn't affect UI Kitten, because it doesn't force you using special version of React Native
I think we will track progress of this issue and if it will not be fixed in recent updates, we could think about downgrading

@deounix
Copy link

deounix commented Jun 26, 2019

@artyorsh I also install expo sdk 31 u must also downgrade some expo library

  "dependencies": {
    "@eva-design/eva": "^1.0.0",
    "expo": "^31.0.2",
    "expo-analytics": "^1.0.7",
    "expo-camera": "^1.1.0",
    "expo-constants": "^1.1.0",
    "expo-media-library": "^1.1.0",
    "expo-permissions": "^5.0.1",
    "react": "16.5.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-31.0.0.tar.gz",
    "react-native-keyboard-aware-scroll-view": "^0.8.0",
    "react-native-ui-kitten": "^4.0.3",
    "react-native-unimodules": "^0.4.1",
    "react-navigation": "^3.11.0"
  },

will after testing every thing work except buttons and tabs text inside got padding. but simple texts now fixed! showed correctly.

I don't know what is the problem. I also test ui kitten with latest react-native version and these problems showed to me.

Also tested ui kitten with react-native 0.57.8 and every thing work 100%. even if I use opensans font (here I'm not using any expo lib (camera, font load, .... etc))

Please re structure kitten tricks (make it simple cuz we love simplicity) (use same structure that used before) now when I opening the project I lost between files and don't know from where should I start.

@artyorsh
Copy link
Collaborator Author

What do you dislike with the structure?

@deounix
Copy link

deounix commented Jul 25, 2019

@artyorsh I understand the structure now 😂.

Also this bug has been fixed in the new android release (20/06/2019)

You can close this issue.

@artyorsh
Copy link
Collaborator Author

@deounix Thanks for the notice! Unfortunately, we can't close this while there is no Expo SDK built on top of the latest RN. Hope we can do this till the next Kitten Tricks app update 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug layout indicates changes in layout examples ui kitten indicates an issue which is potentially related to UI Kitten
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants