Giter Site home page Giter Site logo

Comments (9)

levic92 avatar levic92 commented on May 7, 2024

It could be a possible bug in react native that causes the lineHeight to still be adjusted. See: facebook/react-native#2783

from react-native-vector-icons.

oblador avatar oblador commented on May 7, 2024

I'll await responses to the bugreport. IIRC lineHeight was needed to be able to properly align stuff vertically, but might revisit this :-)

from react-native-vector-icons.

prenaux avatar prenaux commented on May 7, 2024

I had to comment:
// textStyle.lineHeight = size;
// textStyle.height = size;
in create-icon-set.js line 77 & 78 in the latest version.

Without that the icons are truncated badly when using the "zoomed" mode on iOS 9 on an iPhone6s.

from react-native-vector-icons.

rreusser avatar rreusser commented on May 7, 2024

+1 for commenting out 77 & 78. It feels like that's the sort of thing with far-reaching implications, but I'm unable to find any alignment issues that have been hurt by this. On the contrary, together with passing allowFontScaling={false}, this has fixed a number of issues.

from react-native-vector-icons.

rreusser avatar rreusser commented on May 7, 2024

My fix for this issue was to add the ability to pass extra props to the text element (allowFontScaling={false}, passed using PR at #34), then to comment out the two lines mentioned above. My component then looks like:

var disableFontScaling = ComposedComponent => class extends React.Component {
  render() {
    return <ComposedComponent {...this.props} textPropsIOS={{allowFontScaling:false}} />
  }
}

export default disableFontScaling(createIconSet(glyphMap, 'FSIcon'));

from react-native-vector-icons.

oblador avatar oblador commented on May 7, 2024

I've done a pretty major refactor in the inline-refactor branch that should solve this issue. It breaks some backwards compatibility so please test it before I merge.

from react-native-vector-icons.

oblador avatar oblador commented on May 7, 2024

Fixed in 0.8.0.

from react-native-vector-icons.

jamesfzhang avatar jamesfzhang commented on May 7, 2024

Noticed this on when testing with the large iPhone for the first time and was perplexed, glad to have found this with a quick search! Thanks :)

from react-native-vector-icons.

prenaux avatar prenaux commented on May 7, 2024

Great, thanks.

from react-native-vector-icons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.