TextLayout,当方向是rtl括号时,无法正确呈现

时间:2011-08-02 14:24:07

标签: actionscript-3 actionscript

我注意到使用TextLayout时出现渲染问题,当括号在新行开头时无法正确呈现。所以:

    public function TestTextLayout()
    {
        basic(" The Intel Core i7 Processor (720QM)", 500, 500);
    }

    public function basic(text:String, width:int, height:int):void {
        var textFlow:TextFlow = new TextFlow();
        var p:ParagraphElement = new ParagraphElement();
        textFlow.addChild(p);

        var span:SpanElement = new SpanElement();
        span.text = text;
        span.fontSize = 40;
        p.addChild(span);

        textFlow.direction = Direction.RTL;
        textFlow.flowComposer.addController(new ContainerController(this, width, height));
        textFlow.flowComposer.updateAllControllers();

        debug("line height = " + p.lineHeight);
    }

创建以下文本:

The Intel Core i7 Processor 
720QM

有没有人对如何解决这个问题有任何想法?

0 个答案:

没有答案