Search
Preparing search index...
The search index is not available
EF React Native Style Framework
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
Globals
"font/Weight"
FontWeight
Class FontWeight<T>
Provides a way to create a set of divisions that have nice aliases to access them:
example
A basic set of divisions
```ts const weight = new Weight({ base: 500 }); weight.light; // -> 400 weight.normal; // -> 500 weight.bold; // -> 700 ```
example
Customise scaling, reduces the range of the divisions
```ts const weight = new Weight({ base: 16, scale: Scale.PerfectFifth }); ```
example
Customise certain stops (or all of them `100` to `900`)
```ts const weight = new Weight({ base: { 500: 500, 600: 600, 700: 700 }}); ```
Type parameters
T
Hierarchy
Divisions
<
T
>
FontWeight
Implements
IDivisions
<
T
>
IFontWeight
<
T
>
Index
Constructors
constructor
Accessors
100
200
300
400
500
600
700
800
900
bold
light
normal
Methods
__@to
Primitive
Constructors
constructor
new
Font
Weight
(
__namedParameters
?:
object
)
:
FontWeight
Parameters
Default value
__namedParameters:
object
= {}
callback
:
undefined
|
ratio
override
:
undefined
|
T
|
IDivisionsOverrides
<
T
>
scale
:
undefined
|
MinorSecond
|
MajorSecond
|
MinorThird
|
MajorThird
|
PerfectFourth
|
AugmentedFourth
|
PerfectFifth
|
GoldenRatio
Returns
FontWeight
Accessors
100
get
100
(
)
:
T
Returns
T
200
get
200
(
)
:
T
Returns
T
300
get
300
(
)
:
T
Returns
T
400
get
400
(
)
:
T
Returns
T
500
get
500
(
)
:
T
Returns
T
600
get
600
(
)
:
T
Returns
T
700
get
700
(
)
:
T
Returns
T
800
get
800
(
)
:
T
Returns
T
900
get
900
(
)
:
T
Returns
T
bold
get
bold
(
)
:
T
Returns
T
light
get
light
(
)
:
T
Returns
T
normal
get
normal
(
)
:
T
Returns
T
Methods
__@to
Primitive
__@to
Primitive
(
hint
:
"string"
|
"number"
|
"default"
)
:
number
|
string
Parameters
hint:
"string"
|
"number"
|
"default"
Returns
number
|
string
Globals
"font/
Weight"
Font
Weight
constructor
100
200
300
400
500
600
700
800
900
bold
light
normal
__@to
Primitive
IFont
Weight
Divisions
IFont
Weight
Options
font
Weight
Base
font
Weight
Ratio
Provides a way to create a set of divisions that have nice aliases to access them: