You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, first I want to thank you for the wonderful library! However, after trying it, I found that there was an bug in the styling property! I will post my code below but let me explain first! So when i set textAlign: "justify", It puts extra white space even though it does not exist in the original text. See this photo !
In the original text it looks like this typesetting, remaining essentially - there aren't that many spaces! But in styled text there is more than one! So my code so far -
import { StyleSheet, View } from "react-native";
import StyledText from "react-native-styled-text";
export default function App() {
const text =
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.";
return (
<View style={styles.container}>
<StyledText style={styles.header}>{text}</StyledText>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
},
header: {
fontSize: 24,
color: "orange",
textAlign: "justify",
padding: 30,
},
});
The text was updated successfully, but these errors were encountered:
Thanks for your feedback @hristowwe! I think you will get the same result if you just use the react-native Text component directly (which should also be returned by StyledText since no nested styling is applied in this case). Also I think this is the desired formatting "justify": all wrapped lines are get spacing between words to fill the given width.
Hello, first I want to thank you for the wonderful library! However, after trying it, I found that there was an bug in the styling property! I will post my code below but let me explain first! So when i set
textAlign: "justify",
It puts extra white space even though it does not exist in the original text. See this photo !In the original text it looks like this typesetting, remaining essentially - there aren't that many spaces! But in styled text there is more than one! So my code so far -
The text was updated successfully, but these errors were encountered: