开发者

TextLayout, when direction is rtl brackets do not render correctly

开发者 https://www.devze.com 2023-03-24 09:14 出处:网络
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:

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

精彩评论

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