Skip to content

Instantly share code, notes, and snippets.

View jamikado's full-sized avatar

Jeff Adams jamikado

View GitHub Profile
@jamikado
jamikado / FontUtils.as
Last active July 7, 2020 04:52
FontUtils contains FontUtils.allFontNames():Vector.<String> which will return a complete sorted list of font names sorted alphabetically by base font name but then additionally secondary sorting based on font weight names. Additionally, on iOS discovery of more working weighted and fixed names are added. NOTE: this uses FTE text engine and so th…
package
{
import flash.system.Capabilities;
import flash.text.Font;
import flash.text.engine.FontDescription;
import flash.text.engine.FontPosture;
import flash.text.engine.FontWeight;
import flash.ui.Mouse;
import flash.utils.Dictionary;
@jamikado
jamikado / TLFSprite.as
Created July 24, 2012 03:20
TLFSprite is a Starling extension that provides an alternative to starling.text.TextField to render text from OpenType or TrueType fonts (both device and embedded CFF) using the Text Layout Framework instead of flash.text.TextField
// =================================================================================================
//
// based on starling.text.TextField
// modified to use text layout framework engine for rendering text
//
// =================================================================================================
package starling.extensions
{
import flash.display.BitmapData;