Comments (9)
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.
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.
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.
+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.
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.
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.
Fixed in 0.8.0.
from react-native-vector-icons.
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.
Great, thanks.
from react-native-vector-icons.
Related Issues (20)
- Unable to resolve module @expo/vector-icons/FontAwesome6 HOT 1
- Issue Report: Incorrect Icon Returned in "react-native-vector-icons/Feather" HOT 2
- type 'typeof Icon' is not a valid JSX element type HOT 10
- Where did md-* icons from IonIcons go? HOT 1
- Integrate Icons from pictogrammers HOT 1
- Android: Release build fails with React Native 0.72.6 HOT 4
- 'React/RCTBridgeModule.h' file not found - 10.0.1 breaks with RN < 0.71.0 (0.70 is still officially supported) HOT 9
- Add to README new error explanation
- ERROR TypeError: Cannot read property 'get Image Source Sync' of undefined, js engine: hermes HOT 3
- React native 0.72-rc6 android relase error What went wrong: A problem was found with the configuration of task ':app:lintVitalAnalyzeRelease' (type 'AndroidLintAnalysisTask'). HOT 2
- Crashes the app, as IOS has deprecated UIGraphicsBeginImageContextWithOptions from IOS 17.
- Why I can't use all FontAwesome icons? Ex.: 'chart-line'
- Update README about underscore font specifications of e.g FontAwesome5_Brands etc.
- build failed: Could not resolve all files for configuration ':react-native-vector-icons:androidJdkImage' HOT 8
- FontAwesome6Brands not listed on package
- FontAwesome5 icon not working in latest react native version HOT 7
- React native 0.73 fails to build release HOT 12
- Build error - A problem was found with the configuration of task ':app:lintAnalyzeDebug' HOT 5
- Docs for Integrating react-native-vector-icons with Kotlin Codebases HOT 4
- Fonts "downloadable font: rejected by sanitizer" or "Failed to decode downloaded font" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-vector-icons.