Jump to content

Text Vertical Align


Recommended Posts

TS,There is no difference if you only have one line of text in your text block. With two or more lines in a text block, Top Baseline refers to the baseline of the top line of text, while Bottom Baseline refers to the baseline of the last line of text.

Try the following to set the TVA if you are still using VW v8.5.2, which has the TVA attribute, but no way of manipulating it. Does version 9.5.x allow you to change it with a menu? I would hope so.

If you want to set the TVA for all text objects in a file, including symbols and groups, go to VectorDepot for another script to do just that. It also works in 8.5.2, though it says it is for version 9.

Procedure SetTxtVAlign;{ Change the TextVerticalAlign parameter of all selected text objects. } VAR TxtHnd: Handle; TA: Integer; x1, y1, x2, y2, x3, y3 :Real;

BEGIN repeat TA := IntDialog('Text Vertical Align Option (1-5)', '2'); if not DidCancel and ((TA<1) or (TA>5)) then Message('Value out of range. Try again, or Cancel.'); until DidCancel or ((TA>0) and (TA<6)); ClrMessage; if not DidCancel then begin TxtHnd := FSActLayer; while (TxtHnd <> nil) do begin if (GetType(TxtHnd)=10) then { only process text objects } begin GetBBox(TxtHnd, x1, y1, x2, y2); { Save position in (X1, Y1) } SetTextVerticalAlign(TxtHnd, TA); { Text will move after this call } GetBBox(TxtHnd, x2, y2, x3, y3); { Get new position in (X2, Y2) } hMove(TxtHnd, x1-x2, y1-y2); { move text back to original position } end; { end if } TxtHnd := NextSObj(TxtHnd); end; { end while } SysBeep; end; { end if }END; { End SetTxtVAlign }Run(SetTxtVAlign);

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...