so there will be difference in the android & ios text with same fontFamily too.If you want to make them look same in both platforms. You can make your own custom text component with custom styles provided.
Which will be something like ,
import { Text as RNText } from 'react-native';
import { styled } from '@gluestack-style/react';
const StyledText = styled(RNText);
export const Text = StyledText;
If you want to add the custom styles that would be like :
const StyledText = styled(
RNText,
{
color: '$text700',
fontWeight: '$normal',
fontFamily: '$body',
fontStyle: 'normal',
letterSpacing: '$md',
variants: {
isTruncated: {
true: {
props: {
// @ts-ignore
numberOfLines: 1,
ellipsizeMode: 'tail',
},
},
},
bold: {
true: {
fontWeight: '$bold',
},
},
underline: {
true: {
textDecorationLine: 'underline',
},
},
strikeThrough: {
true: {
textDecorationLine: 'line-through',
},
},
size: {
'2xs': {
fontSize: '$2xs',
},
'xs': {
fontSize: '$xs',
},
'sm': {
fontSize: '$sm',
},
'md': {
fontSize: '$md',
},
'lg': {
fontSize: '$lg',
},
'xl': {
fontSize: '$xl',
},
'2xl': {
fontSize: '$2xl',
},
'3xl': {
fontSize: '$3xl',
},
'4xl': {
fontSize: '$4xl',
},
'5xl': {
fontSize: '$5xl',
},
'6xl': {
fontSize: '$6xl',
},
},
sub: {
true: {
fontSize: '$xs',
},
},
italic: {
true: {
fontStyle: 'italic',
},
},
},
defaultProps: {
size: 'md',
},
},
)