function convert( font, reversed ) {

		var round = Math.round;

		var glyphs = {};
		var scale = ( 100000 ) / ( ( font.unitsPerEm || 2048 ) * 72 );

		for ( var i = 0; i < font.glyphs.length; i ++ ) {

			var glyph = font.glyphs.glyphs[ i ];

			if ( glyph.unicode !== undefined ) {

				var token = {
					ha: round( glyph.advanceWidth * scale ),
					x_min: round( glyph.xMin * scale ),
					x_max: round( glyph.xMax * scale ),
					o: ''
				};

				if ( reversed ) {

					glyph.path.commands = reverseCommands( glyph.path.commands );

				}

				glyph.path.commands.forEach( function ( command, i ) {

					if ( command.type.toLowerCase() === 'c' ) {

						command.type = 'b';

					}

					token.o += command.type.toLowerCase() + ' ';

					if ( command.x !== undefined && command.y !== undefined ) {

						token.o += round( command.x * scale ) + ' ' + round( command.y * scale ) + ' ';

					}

					if ( command.x1 !== undefined && command.y1 !== undefined ) {

						token.o += round( command.x1 * scale ) + ' ' + round( command.y1 * scale ) + ' ';

					}

					if ( command.x2 !== undefined && command.y2 !== undefined ) {

						token.o += round( command.x2 * scale ) + ' ' + round( command.y2 * scale ) + ' ';

					}

				} );

				glyphs[ String.fromCharCode( glyph.unicode ) ] = token;

			}

		}

		return {
			glyphs: glyphs,

			familyName: font.familyName,
			ascender: round( font.ascender * scale ),
			descender: round( font.descender * scale ),
			underlinePosition: font.tables.post.underlinePosition,
			underlineThickness: font.tables.post.underlineThickness,
			boundingBox: {
				xMin: font.tables.head.xMin,
				xMax: font.tables.head.xMax,
				yMin: font.tables.head.yMin,
				yMax: font.tables.head.yMax
			},

			resolution: 1000,
			original_font_information: font.tables.name
		};

	}
@author gero3 / https://github.com/gero3
@author tentone / https://github.com/tentone
Requires opentype.js to be included in the project
Loads TTF files and converts them into typeface JSON that can be used directly
to create THREE.Font objects