Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
function x_cap (ip)
{
var tf = app.activeDocument.textFrames.add (
{
geometricBounds: [0,0,40,40],
textFramePreferences : {firstBaselineOffset: FirstBaseline.capHeight},
contents: 'X'}
);
tf.parentStory.appliedFont = ip.appliedFont;
tf.parentStory.pointSize = ip.parentStory.characters[ip.index-1].pointSize;
var cap_height = tf.characters[0].baseline;
tf.textFramePreferences.firstBaselineOffset = FirstBaseline.xHeight;
x_height = tf.characters[0].baseline;
tf.remove();
return [cap_height, x_height]
}
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Find more inspiration, events, and resources on the new Adobe Community
Explore Now