2014 TextItem.size bug
Posted: Thu Oct 09, 2014 12:06 am
Text is contained in a TextItem object. One of it's it's attributes is 'size' for the font size.
You can set it like this:
textItem.size = UnitValue(50, "px");
or
textItem.size = UnitValue(15, "pt");
The problem in the current rev is that regardless of what you set the font size to, it will always stay 12 px. So, if your rez is 72 ppi, the font size is 12 pts. If your rez is 300 ppi, your font size will be 2.83 pts.
My fix was to use low-level ActionManager code from the ScriptingListener plugin. The one problem is that setting the size will bash the font, contents, and several other attributes so you need to set the size immediately after creating the layer.
My fix has been added to xtools and can be found here:
http://ps-scripts.cvs.sourceforge.net/v ... BugFix.jsx ... BugFix.jsx
You can set it like this:
textItem.size = UnitValue(50, "px");
or
textItem.size = UnitValue(15, "pt");
The problem in the current rev is that regardless of what you set the font size to, it will always stay 12 px. So, if your rez is 72 ppi, the font size is 12 pts. If your rez is 300 ppi, your font size will be 2.83 pts.
My fix was to use low-level ActionManager code from the ScriptingListener plugin. The one problem is that setting the size will bash the font, contents, and several other attributes so you need to set the size immediately after creating the layer.
My fix has been added to xtools and can be found here:
http://ps-scripts.cvs.sourceforge.net/v ... BugFix.jsx ... BugFix.jsx