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

[Text] fontWeight='bold' cancels the fontStyle Century Gothic #20445

Closed
badarshahzad opened this issue Jul 29, 2018 · 2 comments
Closed

[Text] fontWeight='bold' cancels the fontStyle Century Gothic #20445

badarshahzad opened this issue Jul 29, 2018 · 2 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@badarshahzad
Copy link

This way the font style works

const styles = StyleSheet.create({
 subHeadingCss: {
    fontSize: 22,
    fontFamily: "century-gothic",
    color: "#3e4152"
  }
});

Century Gothic style work without bold

This way the font style is not work but the font itself become bold in other font family.

const styles = StyleSheet.create({
 subHeadingCss: {
    fontSize: 22,
    fontWeight: "bold",
    fontFamily: "century-gothic",
    color: "#3e4152"
  }
});

Century Gothic style not work with font weight bold

How I have expectations to behave like this mock-up.
mockup

How I add the font family in react native?

import React, { Component } from "react";
import { StyleSheet, Text, View, KeyboardAvoidingView } from "react-native";
import { Font } from "expo";
import AddToCartScreen from "./app/components/AddToCartScreen";

export default class App extends Component {
  constructor(props) {
    super(props);
    this.state = { loading: true };
  }

  async componentWillMount() {
    await Font.loadAsync({
      "century-gothic": require("./app/assets/fonts/CenturyGothic.ttf")
    });
    this.setState({ loading: false });
  }

  render() {
    if (this.state.loading) {
      //first load the text style then to render its necessary
      return (
        <View style={styles.container}>
          <Text
            style={{
              fontSize: 36,
              alignContent: "center",
              alignItems: "center"
            }}
          >
            loading font style ....
          </Text>
        </View> 
      );
    }
    return (
      <View style={styles.container}>
           <AddToCartScreen/>  
      </View>
    );
  }
}
@react-native-bot
Copy link
Collaborator

We are automatically closing this issue because it does not appear to follow any of the provided issue templates.

Please make use of the bug report template to let us know about a reproducible bug or regression in the core React Native library.

If you'd like to start a discussion, check out https://discuss.reactjs.org or follow the discussion template.

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. 📋No Template labels Jul 29, 2018
@badarshahzad
Copy link
Author

This is totally unfair 👎 😠

@facebook facebook locked as resolved and limited conversation to collaborators Jul 29, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

2 participants