Jump to content

Heeeeeeyyy..........FontZ, or Font that goes in Z axis rather than Y


Noobini

Recommended Posts

thanks Matt, if you or any other gurus out there can workout where it stores the line 'gap' internally, then we could do away with the Offset entirely..rather than as of now it's a bit of an eyeballing process...

Must be in there some where since the font 'knows' the line spacing...

Link to comment
Share on other sites

No magic tricks from me I'm afraid. I assume Houdini is relying on the font itself to work out the vertical separation, but doesn't expose that in any way.

Thinking out loud, You could maybe calculate it yourself. The textindex attribute jumps where there's a new line, so you could get the first character of the first line, the first character of the second, then measure the distance from the bottom of the first to the top of the second.

That seems a bit loose though; if you wanted to guarantee where the first char of each line is, you could get the text from the font sop text parm directly, split on the '\n', and go from there. Just proving to myself that its possible in python (and cos its late and I shouldn't go any further with this tonight...)

 

>>> p = hou.parm('/obj/geo1/font1/text')
>>> p.eval()
'line 1\nline2'

 

Link to comment
Share on other sites

thanks Matt...I did wrestle with that python...but sadly couldn't go the distance...so I resorted to my redneck hillbilliness.....hey, hillbillies can be very creative/resourceful too....especially with me cousins ;)

Anyway, ver 1.03: no more eyeballing Offset..now it's fully auto for any fonts...plus you can add manual spacing on top....

 

vu_fontZ.hdanc

Edited by Noobini
Link to comment
Share on other sites

Cool! Be curious to see what you came up with; despite myself I played with detecting the line breaks in vex for another 2 hours past my bedtime, it actually got worse by the end of those 2 hours. 

*time passes as I look at the setup*

Ah jeez, thats such a simple fix, I was waaay overcomplicating it. :)

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...