Colons and full stops goes to the end of first line
- February 14, 2010
- 1 reply
- 1052 views
I am pulling this data from xml, but all full stops and colons goes to the end of first line, see the snapshot.
By the way I tried using direction attribute Direction.RTL for paragraph, span and textFlow but output gets worst, and in fact its much better without defining direction except this dot and colon problem.
Code is:
var textFlow:TextFlow = new TextFlow();
var p:ParagraphElement = new ParagraphElement();
textFlow.fontLookup = FontLookup.EMBEDDED_CFF;
textFlow.renderingMode = RenderingMode.CFF;
textFlow.textAlign = TextAlign.CENTER;
textFlow.verticalAlign = VerticalAlign.MIDDLE;
textFlow.addChild(p);
var span:SpanElement = new SpanElement();
span.text = text;
span.fontSize = 24;
span.color = 0xFFFFFF;
span.lineHeight = "100%";
span.fontFamily = "Tahoma";
span.fontLookup = FontLookup.EMBEDDED_CFF;
p.addChild(span);
var sprite:Sprite = new Sprite();
sprite.x = 28;
sprite.y = 24;
addChild(sprite);
textFlow.flowComposer.addController(new ContainerController(sprite, 400, 100));
textFlow.flowComposer.updateAllControllers();
XML
<block id="8">
<question en:content="One of the world's most expensive license plates, Abu Dhabi ‘1’ was sold for:"
ar:content=":بيعت إحدى أغلى لوحات أرقام السيارات في العالم ('١' أبوظبي) بمبلغ"></question>
<options>
<option answer="true" en:content="US$ 4 mio" ar:content="٤ ملايين دولار أمريكي"></option>
<option answer="false" en:content="US 14 mio" ar:content="١٤ مليون دولار أمريكي"></option>
<option answer="false" en:content="US$ 24 mio" ar:content="٢٤ مليون دولار أمريكي"></option>
<option answer="false" en:content="US$ 34 mio" ar:content="٣٤ مليون دولار أمريكي"></option>
</options>
</block>
