Closed subdan closed 5 years ago
Thank you! I can reproduce this issue.
It can be reproduced with both TextFieldTextRenderer and TextBlockTextRenderer.
When using Align.TOP and Align.LEFT in the TextFormat, the text is not cut off. It seems to be cut off only when using other alignment values like Align.CENTER, Align.RIGHT, and Align.BOTTOM.
The following simplified code will reproduce the issue on my computer:
var headerLabel:Label = new Label();
headerLabel.textRendererFactory = function():ITextRenderer
{
return new TextFieldTextRenderer();
};
var fontStyles:TextFormat = new TextFormat("Arial", 20, 0xFFFFFF, Align.CENTER, Align.CENTER);
headerLabel.fontStyles = fontStyles;
headerLabel.text = "Title — Name";
headerLabel.setSize(200, 80);
addChild(headerLabel);
var button:Button = new Button();
button.label = "Click Me";
button.x = 10;
button.y = 100;
button.addEventListener(Event.TRIGGERED, function():void
{
Starling.current.context.dispose();
})
addChild(button);
When do you plan to fix this issue? Fixing this issue is very important for me.
I plan to fix it before I release the stable build of 4.0. By the end of December for sure, but sooner if find time.
Thank you! It works!
Hello, Josh.
This is a Label with backgroundSkin:
I simulate context restore by calling Starling.current.context.dispose();
When context restore happens Label cut off some text:
I use TextFieldTextRenderer.
Why it happens? Is it a bug? How to fix this issue?
I created a repository with demo project https://github.com/subdan/feathes-label-issue