package openfl.text {
import openfl.utils.Future;
import openfl.utils.ByteArray;
/**
 * 	The Font class is used to manage embedded fonts in SWF files. Embedded
 * 	fonts are represented as a subclass of the Font class. The Font class is
 * 	currently useful only to find out information about embedded fonts; you
 * 	cannot alter a font by using this class. You cannot use the Font class to
 * 	load external fonts, or to create an instance of a Font object by itself.
 * 	Use the Font class as an abstract base class.
 * 
 * @externs
 */
public class Font {
	public function Font(name:String = undefined) {}
	/**
	 * The ascender value of the font.
	 *      	
	 */
	public var ascender:int;
	/**
	 * The descender value of the font.
	 *      	
	 */
	public var descender:int;
	/**
	 * The height of the font.
	 *      	
	 */
	public var height:int;
	/**
	 * The name of the font.
	 *     	 
	 */
	public var name:String;
	/**
	 * The number of glyphs in the font.
	 *      	
	 */
	public var numGlyphs:int;
	public var src:*;
	/**
	 * The underline position of the font.
	 *     	
	 */
	public var underlinePosition:int;
	/**
	 * The underline thickness of the font.
	 *     	
	 */
	public var underlineThickness:int;
	/**
	 * The underline position of the font.
	 *     	
	 */
	public var strikethroughPosition:int;
	/**
	 * The underline thickness of the font.
	 *     	
	 */
	public var strikethroughThickness:int;
	/**
	 * The units per EM of the font.
	 *      	
	 */
	public var unitsPerEM:int;
	/**
	 * Decomposes the font into outline data.
	 * 
	 * @return An instance of `NativeFontData` that contains decomposed font outline information.
	 *      	
	 */
	public function decompose():Object { return null; }
	/**
	 * Retrieves a glyph from the font by a character.
	 * 
	 * @param character The character whose glyph to retrieve.
	 * @return A `Glyph` instance representing the glyph of the character.
	 *      	
	 */
	public function getGlyph(character:String):int { return 0; }
	/**
	 * Retrieves an array of glyphs for a set of characters.
	 * 
	 * @param characters The string containing characters to retrieve glyphs for.
	 * @return An array of `Glyph` instances representing the glyphs of the characters.
	 *      	
	 */
	public function getGlyphs(characters:String = undefined):Array { return null; }
	/**
	 * Retrieves metrics for a given glyph.
	 * 
	 * @param glyph The glyph whose metrics to retrieve.
	 * @return A `GlyphMetrics` instance containing the metrics of the glyph.
	 *      	
	 */
	public function getGlyphMetrics(glyph:int):* { return null; }
	/**
	 * Renders a specific glyph to an image.
	 * 
	 * @param glyph The glyph to render.
	 * @param fontSize The size to render the glyph at.
	 * @return An `Image` instance representing the rendered glyph.
	 *      	
	 */
	public function renderGlyph(glyph:int, fontSize:int):* { return null; }
	/**
	 * Renders a set of glyphs to images.
	 * 
	 * @param glyphs The glyphs to render.
	 * @param fontSize The size to render the glyphs at.
	 * @return A `Map` containing glyphs mapped to their corresponding images.
	 *      	
	 */
	public function renderGlyphs(glyphs:Array, fontSize:int):* { return null; }
	/**
	 * 		Specifies whether to provide a list of the currently available embedded
	 * 		fonts.
	 * 
	 * 		@param enumerateDeviceFonts Indicates whether you want to limit the list
	 * 									to only the currently available embedded
	 * 									fonts. If this is set to `true`
	 * 									then a list of all fonts, both device fonts
	 * 									and embedded fonts, is returned. If this is
	 * 									set to `false` then only a list of
	 * 									embedded fonts is returned.
	 * 		@return A list of available fonts as an array of Font objects.
	 * 	
	 */
	public static function enumerateFonts(enumerateDeviceFonts:Boolean = undefined):Array { return null; }
	/**
	 * 		Creates a new Font from bytes (a haxe.io.Bytes or openfl.utils.ByteArray)
	 * 		synchronously. This means that the Font will be returned immediately (if
	 * 		supported).
	 * 
	 * 		@param	bytes	A haxe.io.Bytes or openfl.utils.ByteArray instance
	 * 		@returns	A new Font if successful, or `null` if unsuccessful
	 * 	
	 */
	public static function fromBytes(bytes:openfl.utils.ByteArray):openfl.text.Font { return null; }
	/**
	 * 		Creates a new Font from a file path synchronously. This means that the
	 * 		Font will be returned immediately (if supported).
	 * 
	 * 		@param	path	A local file path containing a font
	 * 		@returns	A new Font if successful, or `null` if unsuccessful
	 * 	
	 */
	public static function fromFile(path:String):openfl.text.Font { return null; }
	/**
	 * 		Creates a new Font from haxe.io.Bytes or openfl.utils.ByteArray data
	 * 		asynchronously. The font decoding will occur in the background.
	 * 		Progress, completion and error callbacks will be dispatched in the current
	 * 		thread using callbacks attached to a returned Future object.
	 * 
	 * 		@param	bytes	A haxe.io.Bytes or openfl.utils.ByteArray instance
	 * 		@returns	A Future Font
	 * 	
	 */
	public static function loadFromBytes(bytes:openfl.utils.ByteArray):openfl.utils.Future { return null; }
	/**
	 * 		Creates a new Font from a file path or web address asynchronously. The file
	 * 		load and font decoding will occur in the background.
	 * 		Progress, completion and error callbacks will be dispatched in the current
	 * 		thread using callbacks attached to a returned Future object.
	 * 
	 * 		@param	path	A local file path or web address containing a font
	 * 		@returns	A Future Font
	 * 	
	 */
	public static function loadFromFile(path:String):openfl.utils.Future { return null; }
	/**
	 * 		Creates a new Font from a font name asynchronously. This feature should work
	 * 		for embedded CSS fonts on the HTML5 target, but is not implemented for
	 * 		registered OS fonts on native targets currently. The file
	 * 		load and font decoding will occur in the background.
	 * 		Progress, completion and error callbacks will be dispatched in the current
	 * 		thread using callbacks attached to a returned Future object.
	 * 
	 * 		@param	path	A font name
	 * 		@returns	A Future Font
	 * 	
	 */
	public static function loadFromName(path:String):openfl.utils.Future { return null; }
	/**
	 * 		Registers a font in the global font list.
	 * 
	 * 	
	 */
	public static function registerFont(font:*):void {}
	/**
	 * 		The name of an embedded font.
	 * 	
	 */
	public function get fontName():String { return null; }
	public function set fontName(value:String):void {}
	/**
	 * 		The style of the font. This value can be any of the values defined in the
	 * 		FontStyle class.
	 * 	
	 */
	public var fontStyle:String;
	/**
	 * 		The type of the font. This value can be any of the constants defined in
	 * 		the FontType class.
	 * 	
	 */
	public var fontType:String;
}
}
