开发者

TextLayout, when direction is rtl brackets do not render correctly

I have noticed a rendering problem when using TextLayout where brackets don't render correctly when they are on the start of a new line. So:

    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);
    }

Creates the following text:

The Intel Core i7 Processor 
720QM

Does anyone have any ideas on how to fix t开发者_运维百科his?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜