// Copyright 2016, University of Colorado Boulder

/**
 * Tandem type for the PhET Scenery Font class
 * @author Andrew Adare (PhET Interactive Simulations)
 */
define( function( require ) {
  'use strict';

  // modules
  var assertInstanceOf = require( 'PHET_IO/assertions/assertInstanceOf' );
  var phetioInherit = require( 'PHET_IO/phetioInherit' );
  var phetioNamespace = require( 'PHET_IO/phetioNamespace' );
  var TObject = require( 'PHET_IO/types/TObject' );

  /**
   * @constructor
   *
   * @param {Font} font - An instance of a phet.scenery.Font type
   * @param {string} phetioID - Full name of this font instance
   */
  function TFont( font, phetioID ) {
    TObject.call( this, font, phetioID );
    assertInstanceOf( font, phet.scenery.Font );
  }

  phetioInherit( TObject, 'TFont', TFont, {}, {
    documentation: 'Font handling for text drawing. Options:',

    // Serialize this font's configuration to an options object
    toStateObject: function( font ) {
      return {
        style: font.getStyle(),
        variant: font.getVariant(),
        weight: font.getWeight(),
        stretch: font.getStretch(),
        size: font.getSize(),
        lineHeight: font.getLineHeight(),
        family: font.getFamily()
      };
    },

    // Use stateObject as the Font constructor's options argument
    fromStateObject: function( stateObject ) {
      return new phet.scenery.Font( stateObject );
    }
  } );

  phetioNamespace.register( 'TFont', TFont );

  return TFont;
} );

@@ -807,16 +807,42 @@
 t, %7B%7D, %7B
+%0A%0A    // Info from Font.js
 %0A    doc
@@ -894,16 +894,949 @@
 Options:
+ %3Cbr%3E' +%0A    'style: normal      // normal %7C italic %7C oblique %3Cbr%3E' +%0A    'variant: normal    // normal %7C small-caps %3Cbr%3E' +%0A    'weight: normal     // normal %7C bold %7C bolder %7C lighter %7C 100 %7C 200 %7C 300 %7C 400 %7C 500 %7C 600 %7C 700 %7C 800 %7C 900 %3Cbr%3E' +%0A    'stretch: normal    // normal %7C ultra-condensed %7C extra-condensed %7C condensed %7C semi-condensed %7C semi-expanded %7C expanded %7C extra-expanded %7C ultra-expanded %3Cbr%3E' +%0A    'size: 10px         // absolute-size %7C relative-size %7C length %7C percentage -- unitless number interpreted as px. absolute suffixes: cm, mm, in, pt, pc, px. relative suffixes: em, ex, ch, rem, vw, vh, vmin, vmax. %3Cbr%3E' +%0A    'lineHeight: normal // normal %7C number %7C length %7C percentage -- NOTE: Canvas spec forces line-height to normal %3Cbr%3E' +%0A    'family: sans-serif // comma-separated list of families, including generic families (serif, sans-serif, cursive, fantasy, monospace). ideally escape with double-quotes
 ',%0A%0A    

Add docs for TFont