Misaligned selection with "Lucida Handwriting"
Hi,
when I set the format to use "Lucida Handwriting" on an XP machine (using flex_sdk_4.1.0.14706) the selection is misaligned with the text. If you change the font to Arial it works. Lucida Handwriting is a commonly installed system font on PCs. Here is the code I was using:
package {
import flash.display.Sprite;
import flashx.textLayout.container.ContainerController;
import flashx.textLayout.edit.EditManager;
import flashx.textLayout.elements.DivElement;
import flashx.textLayout.elements.ParagraphElement;
import flashx.textLayout.elements.SpanElement;
import flashx.textLayout.elements.TextFlow;
import flashx.textLayout.formats.TextLayoutFormat;
import flashx.undo.UndoManager;
public class SimpleTextFlow extends Sprite
{
private var tf:TextFlow;
private var em:EditManager;
private var um:flashx.undo.UndoManager
private var _init_fmt:TextLayoutFormat;
public function SimpleTextFlow()
{
//define TextFlow and manager objects
tf = new TextFlow();
um = new UndoManager();
em = new EditManager(um);
tf.interactionManager = em;
//define elements to contain text
var d:DivElement = new DivElement();
var p:ParagraphElement = new ParagraphElement();
var s:SpanElement = new SpanElement();
s.text ="This is sample text for the EditManager example.";
//add these elements to the TextFlow
p.addChild(s);
d.addChild(p);
tf.addChild(d);
_init_fmt = new TextLayoutFormat();
_init_fmt.fontFamily = "Lucida Handwriting";
tf.hostFormat = _init_fmt;
//compose TextFlow to display
tf.flowComposer.addController(new ContainerController(this,600,600));
tf.flowComposer.updateAllControllers();
}
}
}

