Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IFont

Provides constants values for font styles that are available in Constants.

example
Using the values ```ts import { TextStyle } from 'react-native'; import { font } from '@Ef-carbon/react-native-style'; const style: TextStyle = { fontSize: font.size.normal, fontWeight: font.weight.normal, fontFamily: font.family.normal, letterSpacing: font.letterSpacing, lineHeight: font.size.normal * font.lineHeight, }; ```
see

IFontSize

see

IFontWeight

see

IFontFamily

see

{@link IfontLetterSpacing}

see

{@link IfontLineHeight}

example
Using the mixins ```ts import { TextStyle } from 'react-native'; import { Theme } from '@Ef-carbon/react-native-style'; const theme = new Theme({ base: 'blue' }); const style: TextStyle = { ...theme.font.primary, }; ```
see

IThemeFont

see

ITheme

Hierarchy

Implemented by

Index

Properties

family

family: IFamily

The name of the font family as a numeric string. Has the IFontFamily aliases available

example
Using the values ```ts import { TextStyle } from 'react-native'; import { font } from '@Ef-carbon/react-native-style'; const style: TextStyle = { fontFamily: font.family.normal, }; ```

letterSpacing

letterSpacing: number

The spacing of the font letters as a numeric value.

example
Using the value ```ts import { TextStyle } from 'react-native'; import { font } from '@Ef-carbon/react-native-style'; const style: TextStyle = { letterSpacing: font.letterSpacing, }; ```
see

{@link fontLetterSpacing}

lineHeight

lineHeight: number

The line height multiple for a font. React Native line height is absolute, so the font size must be used to determine the actual line height

example
Using the value ```ts import { TextStyle } from 'react-native'; import { font } from '@Ef-carbon/react-native-style'; const style: TextStyle = { lineHeight: font.lineHeight }; ```
see

{@link fontLineHeight}

size

size: ISize

The size of the font as a numeric value. Has the ILength aliases available

example
Using the values ```ts import { TextStyle } from 'react-native'; import { font } from '@Ef-carbon/react-native-style'; const style: TextStyle = { fontSize: font.size.normal, }; ```
see

IFontSize

weight

weight: IWeight

The weight of the font as a numeric value. Has the IFontWeight aliases available

example
Using the values ```ts import { TextStyle } from 'react-native'; import { font } from '@Ef-carbon/react-native-style'; const style: TextStyle = { fontWeight: font.weight.normal, }; ```