Extending text styling

I would like to be able to extend the current text styling posibilities.
In particular, I don’t understand why there is a cap on the outline thickness (currently 1 - which just isn’t a lot)

How can I make the outline thicker than 1?

Any ideas or info are greatly appreciated

1 Like

Hi @Sophie_Refshauge, indeed you aren’t able to set values greater than 1 for outline thickness. @will @vaios may be able to comment if this something that can be extended to support in engine/editor.

I’ve studied the shader code in engine for rendering the text and there is a private scaling constant factor that can be used to render thicker outlines in runtime (but not in editor). For the moment, as a temp workaround, you might be able to try increasing the scaling factor in a text element, something like this (haven’t tried it):

this.entity.element._outlineThicknessScale = 0.5; // default value is 0.2
this.entity.element.outlineThickness = 1.0;

Tested my suggestion and sadly it won’t work. It seems that the shader normalizes the values to 0.0 - 1.0, increasing the outline value will produce artifacts right now and not thicken the outline.

1 Like

My recollection is that the font rendering starts to break down soon after a thickness value of 1.

1 Like

What do you mean by “break down”? @will

Is there someway to introduce custom css styling maybe, since we’re using the browser?

I mean that the text starts to render incorrectly and becomes unreadable as the thickness increases beyond 1.

It’s irrelevant that we’re rendering in the browser because the text is rendered with WebGL and not the DOM (HTML + CSS).

@Leonidas thank you for taking the time to try and help me. I appreciate it.

1 Like