jit.gl.text tips&tricks sharing
sharing a little help with jit.gl.text (previously known as (jit.gl.text2d)
Just thought I’d share some knowledge
if some of you ever need it. I’m posting ‘cause I know it’s
been a topic here many times
jit.gl.text or jit.gl.text3d.
The reason to choose jit.gl.text is mainly that you can have
a multiple line text in 1 go. Here is the way to do it on a MAC
-open app “text edit”
-go to preferences and choose : plain text
-write your multi-line text
-save text (preferably in same path as patch)
-make sure to include file extension .txt
when reading your text using jit.textfile (don’t forget to bang jit.textfile)
or use [read, bang].
Now since this a gl object you get to use the regular transform @ttribute
like position , scale, rotatexyz, color.
But the scale behaves strangely, so fontsize behaves more like
would your scale attribute.
to adjust space between lines use leadscale.
multiple blank spaces in your text they will be displayed in jit.gl.text.
thanks to the c74 team for work on this.
I remember there were a few glitches when working with this
object but I can’t remember at the moment. I think it had something to
do with fsaa 1 no responding ….
Anyways, hope this helps someone.
cheers
phiol
Woah , woah, woah, what do we have here.
I posted a little fast, I just saw that C74 added the @mode attribute.
Where you can have jit.gl.3d right in jit.gl.text.
There you go!
Thanks C74 :-)
phiol
yes jit.gl.text is the new comprehensive text object for opengl, and allows you to easily switch between 2d, 3d, outline text modes. there are some new layout features present in jit.gl.text, most importantly the @line_length attribute and @align attributes
I found this thread while updating Max6 jit.gl.text2d and 3d patches to Max7 and jit.gl.text.
It seemed worth mentioning that 2d mode does NOT responds to position or scale attributes. I believe the fontsize attribute takes the place of scale. I'm still figuring out how to translate absolute positioning in 2d mode. 3d mode, however, doesn't respond to fontsize and DOES respond to scale.
So, for me, using 3d mode for everything has been the easiest way so far to get my Max6 patches up and running with jit.gl.text. There seem to still be other differences. Patches that ran reliably in Max6 are crashing. When I isolate the problems, I'll post again.
@bokemono,
Yep thanks for clearing that out from my post.
That's what I meant in the area "But the scale behaves strangely, so fontsize behaves more like
would your scale attribute." You made it clearer , by saying that, that was the @mode 2d.
thanks
fontsize is only for 2d mode. position and scale however apply to all modes. if this isn't working for you, please post a patch.
FWIW, there's some improvements to gl.text in 7.0.2, that provide more consistency with Max 6 jit.gl.text2d behavior.
Hi Rob,
Position and scale changes are indicated when jit.gl.text is inspected, but it's not showing up on screen. I'll post a patch in a bit. In the meanwhile, here is a simplified patch for another issue. The letter "m" in copperplate font crashes Max7. Only "m" and only copperplate so far...
MacBookPro 2.6GHz Intel Core i7, 16 GB Memory, 10.9.5 Mavericks
As usual, Rob is right. Scale and position are working in 2d mode, but perhaps only with automatic rendering. Here's a simple patch that illustrates my confusion. With automatic 0/matrixoutput 1, new position coordinates doesn't seem to update, but maybe I'm doing something wrong?
Hi! Great tips here, someone knows how to fill the outline mode? Right now i'm superimposing a 3d mode in yellow with the outline in black, but maybe in the outline mode there's something i'm missing,
Thanks in advance,
Best!
@line_width , and playing with the @scale and the @precision
But in all cases , it looks terrible.
Maybe your best bet is what you're doing.
phiol
Hey Rob, I wanted to make a wee presentation about Max with Max, but I cannot use longer texts, because line_length doesn't do what it supposed to do. If the value is more than 0 it puts random letters under my text in 90 degree, very weird, but it doesn't sort the words to the next line as I hoped.