Forums > Javascript

Getting the X-extent of a string

February 4, 2011 | 5:45 am

I’ve got this patch where I’m writing a string to an [lcd] and I’m having a terrible time trying to get the offsets to work properly. I need to start the string at the correct place, but in order to do that I need the X-extent of the string I want to write (so that I can move to the left enough).

Couple of questions here: Can I even do this in JavaScript? Should I be using jitter instead of [lcd]? The font is not monospaced, because it’s a music font. Thanks all.

-Andrew


February 7, 2011 | 1:31 pm

I think this is built in to [jsui] seeing as it was designed for creating interfaces but if you’re using a regular [js] and [lcd] you might be out of luck.

lh


Viewing 2 posts - 1 through 2 (of 2 total)