Calculate Width of String, not Length? 'Em' not 'Kearning'?

M

Matt

I know to find the Length of a string, you can use the LEN() formula.
Is there a way to calculate the Width of a string in pixels or some
other units of measurement?

For example, look at these five letter words below, they all have the
same number of letters, but because some letters are wider than
others, the total width of the word on the screen/page is wider.
Like, the capital letter W is wider than the capital letter I.

SILLY
FILES
INDEX
PRICE
WHITE
BUNNY
HARSH
RANGE
HORSE
AGGRO
WHALE

(you can see, depending on the font you're viewing this list in, that
the words at the top of this list are slightly shorter in pixel or em
width, and the words at the bottom are wider. if my phrase/string
contains multiple wider characters, it throws me over limit)

My end result requires me to print all-caps text on a small tag, and I
thought the LEN of 36 was the limit, but it actually depends on the
width of each letter and if the phrase has too many wider letters, it
runs off the page, regardless if it is less than 36 characters or not.

From what I hear, I'm looking for the "Em" measurement?
http://en.wikipedia.org/wiki/Em_(typography)

Any ideas?
 
R

Ron Rosenfeld

I know to find the Length of a string, you can use the LEN() formula.
Is there a way to calculate the Width of a string in pixels or some
other units of measurement?

For example, look at these five letter words below, they all have the
same number of letters, but because some letters are wider than
others, the total width of the word on the screen/page is wider.
Like, the capital letter W is wider than the capital letter I.

SILLY
FILES
INDEX
PRICE
WHITE
BUNNY
HARSH
RANGE
HORSE
AGGRO
WHALE

(you can see, depending on the font you're viewing this list in, that
the words at the top of this list are slightly shorter in pixel or em
width, and the words at the bottom are wider. if my phrase/string
contains multiple wider characters, it throws me over limit)

My end result requires me to print all-caps text on a small tag, and I
thought the LEN of 36 was the limit, but it actually depends on the
width of each letter and if the phrase has too many wider letters, it
runs off the page, regardless if it is less than 36 characters or not.

From what I hear, I'm looking for the "Em" measurement?
http://en.wikipedia.org/wiki/Em_(typography)

Any ideas?

I would just use a fixed pitch font
 
M

Matt

I would just use a fixed pitch font

I had thought of a font change, but the tags have restricted
parameters and I have dozens of fonts to go through and I’m not sure
if the client will accept a drastic change to the tag template.
 
G

GS

Matt formulated the question :
I had thought of a font change, but the tags have restricted
parameters and I have dozens of fonts to go through and I’m not sure
if the client will accept a drastic change to the tag template.

If a font size where 36 characters falls of the printed page then...

Either:
use a smaller font

adjust page margins

do both the above

OR:

set PageSetup to print 1 page wide and leave PagesTall empty.
 
M

Matt

Matt formulated the question :











If a font size where 36 characters falls of the printed page then...

  Either:
    use a smaller font

    adjust page margins

    do both the above

  OR:

    set PageSetup to print 1 page wide and leave PagesTall empty.

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc

--- Posted via news://freenews.netfront.net/ - Complaints to (e-mail address removed) ---

Although that would be good advice for a regular word processing
program, I'm using specific barcode/price tag printing software which
is more restrictive on requirements and parameters and doesn't give me
much wiggle room.

My resources are limited and the printing software isn't that
versatile, so I prefer to use Excel. I've figured out a way to give me
the approximate width of each string, but there is a margin of error
so I've decided I'll do a few trial runs to see if this margin of
error is acceptable (or how to accommodate it) and then I'll just run
with it. I need to have these all printed by this time tomorrow.
 
G

GS

Matt formulated the question :
Although that would be good advice for a regular word processing
program,

I don't use word processing programs because I haven't found anything
they can do better than I can do with Excel! Ergo, my opinion of
print/page setup with Excel comes by years of experience using Excel
for word processing as well as the spreadsheet features!
I'm using specific barcode/price tag printing software which
is more restrictive on requirements and parameters and doesn't give me
much wiggle room.

Care to say the name of that software?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top