Gamua / Starling-Framework

The Cross Platform Game Engine
http://www.starling-framework.org
Other
2.82k stars 821 forks source link

Blurry text on High DPI display #1055

Closed leitwolf closed 5 years ago

leitwolf commented 5 years ago

os: windows 10 version:1803 system display scale: 125% project type: air application.xml setting:

<requestedDisplayResolution>high</requestedDisplayResolution>

Starling init:

_starling = new Starling(RootClass, stage, null, null, Context3DRenderMode.AUTO, Context3DProfile.BASELINE);
_starling.supportHighResolutions = true;
_starling.skipUnchangedFrames = true;
 _starling.antiAliasing = 16;
_starling.start();

TextField code:


            var tf:TextFormat = new TextFormat("SimSun", 12, 0xbdbdbd,HorizontalAlign.LEFT);

            var label:Label = new Label();
            label.x = 100;
            label.y = 100;
            label.text = "Feathers Label text显示列表";
            label.width = 500;
            label.fontStyles = tf;
            this.addChild(label);

            var text2:TextField = new TextField(500, 100, "Starling TextField text显示列表");
            text2.format = tf;
            text2.x = 100;
            text2.y = 120;
            this.addChild(text2);

debug message(trace):

stageSize: 786 563
viewport: (x=0, y=0, w=786, h=563)
contentScaleFactor: 1.25

demo: tempsnip

PrimaryFeather commented 5 years ago

I could reproduce and fix the issue. Thanks for making me aware of this! Please try out the changes and let me know if it fixes it for you, too.

leitwolf commented 5 years ago

Fixed, thank you!