×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

how to code other than 100% scale in a text line (show)
2

how to code other than 100% scale in a text line (show)

how to code other than 100% scale in a text line (show)

(OP)
a string (text line) printed by a command show has a 100% width

widthshow & ashow make space between chars/glyphs more narrow or wide.

i need a chars/glyphs themselves to become wider
in AI this feature is been called - Horisontal Scale

is there such a commnand in PS ?

thx in advance

RE: how to code other than 100% scale in a text line (show)

This line allows you to set the width and height of a font, just change the Font name and width/height values to what you require

 FONT NAME                W     H
/Helvetica-Bold findfont [7 0 0 6.2 0 0] makefont setfont
                          ^     ^

RE: how to code other than 100% scale in a text line (show)

(OP)
2 popalu
thx
however when i am writing this operator
/Helvetica-Bold findfont [7 0 0 6.2 0 0] makefont setfont

it prints upside down

what operator/parameter is responsible for this?

here is a portion of my Text script

%%start script

%%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 0 0 1000 144

100 155.2 moveto
/Swiss721BT-Bold findfont [6.59999 0 0 -6 0 0 ] makefont setfont
(T.J. Clark) show

100 69 moveto
(Swiss721BT-Roman) 6.50 selectfont
0.2 0 (Main: 415 123-4567 ) show

showpage

%% end script

first operator prints upside down
second prints normal

RE: how to code other than 100% scale in a text line (show)

Oh, he gets a star for the same information I posted? I'm kidding - I don't care.

So which code are you using, the one the the negative "y" value, or the version with the positive "y" value? You've posted both, so it isn't clear. If -6 makes it print upside down, then use +6, and vice-versa.

Thomas D. Greer
www.tgreer.com

RE: how to code other than 100% scale in a text line (show)

(OP)
2 tgreer

yes, i've noticed that
about +/- in values (+/-6)
now it works

interesting, that original file had "-", so i did copy-paste, and it was not working properly

i have PS tasks in my scripting, but can't spend too much time on it
and i am repeatedly back to PS issues from time to time
my programs generate PS files online for simple layouts

in past i tried to use this FONT notation (operator) making a copy-paste from original file

/Swiss721BT-Roman*1 findfont [6.59999 0 0 -6 0 0 ]mfnt sfnt

it was NOT working, so I switched to another simplier notation, like
(Swiss721BT-Bold) 6.50 selectfont

the point is that AI does not say where is an error trying to open PS file
AI message is "Unable to open file"

today i "accidentally" changed
"mfnt sfnt" onto "makefont setfont"
and it worked

how come "mfnt sfnt" was working in the original file hell knows
(may be there is an operator of re-assigning??)

now about stars
dear tgreer i will give to u 3 stars if u will help me with another issue, i asked months ago

how to make a right justification?

example
if i need to place a line
"tgreer gets 3 stars"
in a position 100 115
my program will generate simple lines
100 115 moveto
("tgreer..") show

now if i want this line to END in a position 100, 115 what is an algorithm? is there a reserse typing operator in PS?









RE: how to code other than 100% scale in a text line (show)

Forget the stars, seriously... it makes no difference, I was making a joke.

There is no right-justification command. You use "stringwidth" to determine the length of a string, and back-track to the starting position.

So:

CODE

(some string) dup stringwidth pop 100 exch sub 115 moveto show

Would cause the string to END at position 100,115.

Thomas D. Greer
www.tgreer.com

RE: how to code other than 100% scale in a text line (show)

Sorry Tom ... lol, I was just showing the syntax of the command, not stealing your thunder

RE: how to code other than 100% scale in a text line (show)

Yeah. I have so much of my ego invested in this little forum. Not so, another joke. Welcome!

Thomas D. Greer
www.tgreer.com

RE: how to code other than 100% scale in a text line (show)

(OP)
2 tgreer
thx
this forum doesn't allow to give more than 1 star at a time
your last sample of coding was one of the most, that excited me last months
want to be hammer it on (my) wall
works perfect, thx

btw now i am solving the next task - how to make centered a text line, i.e.
(Tom's jokes deserve stars too)
- centered in position 100, 120
when dividing a line in two with different justificaions, a problem occurs with 2 neighbor letters in the very center

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close