Skip to content

PhetFont

Overview

Encapsulation of the font used for PhET simulations. Provides PhET-specific defaults, and guarantees a fallback for font family.

Sample use: new PhetFont( { family: 'Futura', size: 24, weight: 'bold' } ) new PhetFont( 24 )

@author Chris Malley (PixelZoom, Inc.)

Class PhetFont

import { PhetFont } from 'scenerystack/scenery-phet';

Constructor

new PhetFont( providedOptions? : number | string | FontOptions )

Instance Methods

Source Code

See the source for PhetFont.ts in the scenery-phet repository.