2021.2 - new font properties

I was excited to see the new font properties supported in the ui builder, but when I use them I get results like the following:


(https://i.gyazo.com/fd09f0fb7c1d4d998d2fb1400b54e71b.png)

Here it is zoomed in:


(https://i.gyazo.com/921e5e8100b9117e67efdc0d59aeff76.png)

The outline width is kind of all over the place. IT’s not 1px. It’s also not anti aliased or anythying.
The text “blur-radius” doesn’t seem to blur at all either.

Am I missing some settings?

Also - what is a the “Font” versus “Font Asset” ?

“Font Asset”: is not referenced in the documentation here: Unity - Manual: USS properties reference

Thanks

1 Like

Hi, I am trying to repro with 2021.2.1f1 but I am not able to. I get something cleaner with the appropriate results:

Can you tell me what is your current workflow? Editor version, packages installed, Uxml and Uss contents. Thanks!

Hi @jnhackleman_unity !

Our current goal text-wise for UI Toolkit is to achieve feature parity with TextMeshPro (the current text engine of UGUI). I know we are desperately lacking documentation on the UITK text features, but in the meantime, a lot of the existing TMP documentation is applicable. For instance, here’s some documentation on FontAssets. This post may also be of interest.

Now regarding your issue. Behind the scene, Fonts are dynamically converted to FontAssets with settings that match most use cases. Which is small to medium font size and a medium rendering quality to ensure characters can quickly be rasterized. For big font sizes and special use cases ( such as Pixel Perfect…) it is recommended to create a FontAsset. FontAsset can be assigned through the -unity-font-definition USS property. In your use case, you may want to increase the sampling point size and use a higher quality atlas rendering mode.

Sorry for the lack of documentation. We are working hard to improve the situation.
I hope this helps.

Hi @jnhackleman_unity !

Could you share your project ? I’m having much better results than you when testing locally.

Hi,
I’ve been playing with the Text Asset creator, and the panel settings and what not and have managed to make it a bit better looking.

However, I did find that the opacity of the outline, and the shadow are not respected when I set the opacity on the containing element via code, or even a parent element. The outlines remain visible.
I have submitted a bug: 1379601

See: https://gyazo.com/2a32ca6aede95bc1d0cb64fd3d2f867b

1 Like

Thanks @jnhackleman_unity , I’ll keep you updated!

Hi @jnhackleman_unity , I opened your project, but I have much better results rendering-wise. Do you have other ideas on how we could replicate this locally?

Also, we’ll have a look at the opacity issue shortly.