Ascent/Descent position of selected character


how can find selected character lies in ascender line or descender line?

i so:

 

main();  function main() {     var outlines, gb;      if (app.selection.length > 0 && app.selection[0].constructor.name == "character") {         outlines = app.selection[0].createoutlines(false)[0];         gb = outlines.geometricbounds;         outlines.remove();         alert("ascender line = " + roundstring(gb[0], 1) + ", descender  line = " + roundstring(gb[2], 1));     }     0 }  function roundstring(numval, decimals) {     var retval = math.round(numval * math.pow(10,decimals)) + "";     retval = retval.substring(0,retval.length-decimals) + "." + retval.substring(retval.length-decimals);     return retval; } 


More discussions in InDesign Scripting


adobe

Comments

Popular posts from this blog

Warning, the Safe Path is not accessible vm3 - Joomla! Forum - community, help and support

uppercase letters in url - Joomla! Forum - community, help and support

Joomla! Update is not offering Joomla 3 - Joomla! Forum - community, help and support