Forum

Is there an equivalent to brush pin text in dx 11?


#1

Hello all !
I’m searching an equivalent to brush pin in text dx11…
How can I do stuff like that ?
thanks in advance !


#2

there is none. you could use the glyphinfo node to get at least the width in pixels and draw a quad yourself.
but 1. the width seems not really accurate, at least in my tests. 2. you wont get the height at all.


#3

check CaretRange (String DirectWrite) in combination with Text (DX11.Layer Advanced). When working in pixel space this returns the correct length of your text.


#4

There’s also a TextBackground node in mp.dx iirc, but I’ve never used it.


#5

totally missed that caretrange node. thanks @aivenhoe.
@phildar: see the patch, just added a quad to the help patch of caretrange to draw the “brush”
CaretRange (String DirectWrite) help.v4p (26.1 KB)


#6

Those nodes are also perky to the fonts, some fonts have incorrect glyphs or something…