Labels appear fuzzy or with jagged edges

Hi All - Our users of CesiumJS complain our labels appear fuzzy, or with jagged edges. We have attempted to help improve label rendering by varying font size, font family, fill colors, background colors, scale factors, and toggle as many label properties such as fxaa that may apply to anti-aliasing as documented. We have recently upgraded to v1.90 but the rendering problem still exists.

We have had no success in improving label rendering that would provide an improved cleaner, crisper appearance. Ideally, we would like the rendering to be as clean as true-type font rendering provided by html and the browser.

Can anyone provide their comments to a solution, or if you have had similar complaints and how you may have solved this. Thank you in advance.

Hi @mattjurgensen,

Thank you very much for reaching out to the community with your question. To the best of my knowledge, this is still a lingering issue in CesiumJS. I am going to reach out to the rest of the CesiumJS squad to see if they have any additional suggestions. In the meantime, feedback from the rest of the community is welcomed! :grinning: :rocket:

-Sam

Hi Matt,

Unfortunately FXAA and MSAA do not help label rendering, and in the case of FXAA may actually make their quality worse.

While nothing in currently in the works, I can assure you we are well aware label rendering could use improvement. There are no immediate plans to overhaul it at the moment, but visual quality issues are certainly top of mind.

In the meantime, I would suggest rendering labels where possible with overlaid HTML elements. You can translate any position in Cesium to the x and y position on the screen, and then position this element accordingly, like in the feature picking Sandcastle example. Then you can style as you please with different font families, colors, padding, hover states or any other effects available through CSS. This is the approach we tend to take when writing our own apps based on CesiumJS, and I believe several other CesiumJS users take this approach too.

Hope that helps, and I’m interested to see what other members of the community may be doing.

Thanks!
Gabby