How to check the width of a font?

ylijohe

Board Regular
Joined
Sep 6, 2002
Messages
58
I´m stuck in a problem that in order to make some text lines same size, you need to know the width of a font...is it possible?
This message was edited by ylijohe on 2002-10-02 08:00
 

Some videos you may like

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Ian Mac

MrExcel MVP
Joined
Feb 20, 2002
Messages
1,174
On 2002-10-02 07:52, ylijohe wrote:
I´m stuck to a problem that in order to make some text lines similar size, you need to know the width of a font...is it possible?

I doubt it, the width of a font may be a standard thing for that font (each one is different), like en and em (the width of a letter n and the width of a letter m).
BUT! the real trick to fonts is that it's all basically an optical illusion.

take the the letters yo and ym if you use certain fonts the y overhangs the o and the doesn't with the m, this is so when reading it, optically it all looks the same and doesn't look odd.
For the same reason, nearly all rounded letters in most fonts eg. o u c s hang above and below the line because there arc would make them seem smaller in camparison to k w n etc.
Basically it's called kerning, and each set of letter pairs has it's own spacing.

So, I don't think so,
sorry for the long winded explaination.
 

ylijohe

Board Regular
Joined
Sep 6, 2002
Messages
58
Yes, as an old TeX-user I´m familiar with kerning etc, just wondering if it was possible in Excel...

I think there must be a solution for this, it just has to be found.

Thanks anyway!
 

philR

Active Member
Joined
Feb 25, 2002
Messages
257
easier with fonts such as courier new, where each character is the same width. Otherwise, the only thing I can think off the top of my head is to use a spare or hidden sheet, and with a macro, paste each line of text into a cell, then set the width of the column to auto fit selection, then check the width of the column. You can record a macro to do all of this except checking the width of the cell, which is just :
range("A1").width

If you need more help writing the macro, let me know. Some Excel guru is now going to tell you there is a much better way, but this is all I can think of. At least it gives you some numbers to play with!

PhilR
 

Watch MrExcel Video

Forum statistics

Threads
1,127,625
Messages
5,625,947
Members
416,144
Latest member
JohnMacDonald

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top