Limitations

WGLTR script limitations

Unsupported CSS properties


text-decoration

The CSS text-decoration property is ignored when rendering.
When the text is made transparent the CSS text-decoration-color property is set as the color of the text and will be visible.
To use a custom color, set the customTextDecorationColor option to true.

text-decoration

text-overflow

The CSS text-overflow property is not supported and will be ignored. The text will be displayed in full.


writing-mode

The CSS writing-mode property is not supported and will be ignored.
When used, the text will have a slightly incorrect position and will not be flipped.


background-clip

The CSS background-clip property with value text is not supported and will be ignored.
You can use the backgrounds option instead.

Limited CSS properties


letter-spacing

The CSS letter-spacing property is not supported if the split option is set to word.


font-variant

The CSS font-variant property is only supported with normal and small-caps values, since the 2d canvas context only supports those values.


transform

The CSS transform property is only supported if it is applied to the element to which the script is applied.
All parent and internal elements with the transform property will be ignored and the text position will be calculated incorrectly.


hyphens

The CSS hyphens property only supports the manual value.

Ligatures

Since each glyph of a character is rendered on the texture separately from the others, stylistic ligatures and letters that change their form depending on their position in relation to other letters will be rendered as single characters.


Stylistic ligatures

Letters that change their form depending on their position in relation to other letters will be rendered as single characters, to avoid this you can specify such characters in the ligatures option and the set of such characters will be drawn as single characters.

wrong decoration stroke

Texture generation


Stroke

Some fonts have overlapping contours and will not render correctly with the stroke option. To partially fix this you can use the stroke option with the 'out' value.

wrong decoration stroke
WebGL is not supported by your browser.