Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IFontOptions

Provides a way to override the font constants

example
import {
  Font,
  FontSize,
  FontWeight,
  FontFamily,
  fontLetterSpacing,
  fontLineHeight,
} from '@ef-carbon/react-native-style';

// Can be default constructed
const font = new Font();

// This will be the same as `font`, see the nested classes for extra customisations
const options = new Font({
  size: new FontSize(),
  weight: new FontWeight(),
  family: new FontFamily(),
  letterSpacing: fontLetterSpacing,
  lineHeight: fontLineHeight,
});

// This will be the same as `font`
const options = new Font({
  letterSpacing: 0.25,
  lineHeight: 1.4,
});
see

FontSize

see

FontWeight

see

FontFamily

see

{@link fontLetterSpacing}

see

{@link fontLineHeight}

Hierarchy