Label font is not clear

388 views
Skip to first unread message

邴起烜

unread,
Dec 13, 2016, 5:03:37 AM12/13/16
to cesium-dev
Hello,

I create a label entity on my view , I set the font size 13px, then it looks not clear. My cesium's version is 1.28.

The code as follows:

-----------------------------------------------------------------------------------------------
function offsetByDistance() {
    Sandcastle.declare(offsetByDistance);
    var image = new Image();
    image.onload = function() {
        viewer.entities.add({
            position : Cesium.Cartesian3.fromDegrees(-75.1641667, 39.9522222),
            billboard : {
                position : Cesium.Cartesian3.fromDegrees(-75.1641667, 39.9522222),
                scaleByDistance : new Cesium.NearFarScalar(1.5e2, 5.0, 1.5e7, 0.5),
                image : image
            },
            label : {
                text : '东海舰队',
                font : '13px Verdana',
                horizontalOrigin : Cesium.HorizontalOrigin.CENTER,
                pixelOffset : new Cesium.Cartesian2(0.0, -image.height),
                pixelOffsetScaleByDistance : new Cesium.NearFarScalar(1.5e2, 6.0, 1.5e7, 0.5)
            }
        });
    };
    image.src = '../images/facility.gif';
}
-------------------------------------------------------------------------


But sometimes when I adjust the camera's orientation, it also can shows clearly.


I tried change the font-family but failed.  Then I set the font bold, it shows a little better...



But i want an effect clear but not bold...Please tell me how to change it? Thanks





Hannah Pinkos

unread,
Dec 13, 2016, 12:15:26 PM12/13/16
to cesium-dev
Hello,

This is a known issue, we have some details written up here: https://github.com/AnalyticalGraphicsInc/cesium/issues/4235
You can try setting viewer.scene.fxaa = false; to see if that helps make the text more clear.

Best,

Hannah

Rick Bing

unread,
Dec 14, 2016, 3:55:08 AM12/14/16
to cesium-dev
Thank you very much!  I also changed the BillboardCollection.glsl,and it showed better!   Please forgive my poor English...

在 2016年12月14日星期三 UTC+8上午1:15:26,Hannah Pinkos写道:
Reply all
Reply to author
Forward
0 new messages