P粉5140018872023-09-03 00:58:02
By default, the lineHeight property is set to a multiple of the font size.
You can set it yourself by adding {lineHeight: fontSize}
(or any other desired amount) to combinedStyles.
const combinedStyles = [ styles.defaultText, style, isBold && styles.boldText, isItalic && styles.italicText, { fontSize: fontSize }, { color: color ?? "black" }, { lineHeight: fontSize }, ];
Also try setting paddingTop or paddingBottom or marrginTop or marrginBottom individually, as they may be Overrides general padding and margins defined elsewhere.
Also set includeFontPadding: false
, because there may be default font padding.