* Initializes a new instance of the Font class. * @param family The family. * @param size The size. * @param style The style. * @param weight The weight.
(
family: string,
size: number,
style: FontStyle = FontStyle.Plain,
weight: FontWeight = FontWeight.Regular
)
| 445 | * @param weight The weight. |
| 446 | */ |
| 447 | public constructor( |
| 448 | family: string, |
| 449 | size: number, |
| 450 | style: FontStyle = FontStyle.Plain, |
| 451 | weight: FontWeight = FontWeight.Regular |
| 452 | ) { |
| 453 | this._families = FontParser.parseFamilies(family); |
| 454 | this._size = size; |
| 455 | this._style = style; |
| 456 | this._weight = weight; |
| 457 | this._css = this.toCssString(); |
| 458 | } |
| 459 | |
| 460 | public withSize(newSize: number): Font { |
| 461 | return Font.withFamilyList(this._families, newSize, this._style, this._weight); |
nothing calls this directly
no test coverage detected