setSlant for DirectLabel or OnscreenText

i am trying to put some text with slant (italics) using a DirectLabel or OnscreenText but i cant seem to find a relevent option. Since these are wrappers arround textNode i am sure that it can be done somehow.
Alternativelly i can create a textNode but i need it to be attached to a DirectFrame and i am not able to find how.
thanks for any help

Text effects like slant, color, etc can be handled with the TextProperties manager.
Simply create a TextProperties variable, ser slant on it and add it to a TextProperiesManager instance with a specific tag name you then can directly use in the text to tell where the effect starts and ends.

Take a look here for further description and samples:

1 Like

A DirectFrame is a NodePath like any other, which means that you should be able to simply reparent your TextNode’s NodePath to the DirectFrame. Something like this:

self.myFrame = DirectFrame(<parameters here>)

self.myTextNode = TextNode(<text-node name here>)
self.myTextNodeNP = NodePath(self.myTextNode)

1 Like

Thanks for both answers they were actually complementory. it works like i wanted

1 Like