Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
|
|
Photoshop script (textItem.width) |
Page: 1 | Reply |
Jan 15th 2007 | #175906 Report |
Member since: Jan 15th 2007 Posts: 2 |
I am very new to scripting and I am having a little difficulty retrieving an accurate width for my text. My code: var widthx = artLayerRef.textItem.width.value; var w = (227 + ((border-1)*687)) + ((605-widthx)/2); widthx is passed to a function I named GetDim(widthx...etc) which contains the second statement (var w= 227......) The width that I get isn't the actual pixel width of the text (I measured it in photoshop). If anybody can help it would be deeply appreciated. Thank you. Eitan |
Reply with Quote Reply |
Jan 16th 2007 | #175929 Report |
Member since: Mar 18th 2001 Posts: 6632 |
What language are you coding in and what is it for? Hard to be of any help with just a snippet of code.
|
Reply with Quote Reply |
Jan 16th 2007 | #175930 Report |
Member since: Jan 15th 2007 Posts: 2 |
I'm coding in Javascript. My question basically boilds down to, why doesnt artLayerRef.textItem.width.value return the actual width of the text content?
|
Reply with Quote Reply |
Page: 1 | Back to top |
Please login or register above to post in this forum |
© Web Media Network Limited. All rights reserved. No part of this website may be reproduced without written permission. Photoshop is a registered trademark of Adobe Inc.. TeamPhotoshop.com is not associated in any way with Adobe, nor is an offical Photoshop website. |