Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Printing and Fonts / May 2004

Tip: Looking for answers? Try searching our database.

How to get the exact size of a Character, Symbol?  

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
chenfeng - 18 May 2004 10:04 GMT
 In the Microsoft Word, the size of a Character is related to its "Font
Size" . But I found that, with the same "Font Size", the size of the
character is changing when set "Bold","Italic" or "superscript" Format.
In another way,
 Can someone tell me: How to get the exact size of a formated character or
Symbol?
 Thanks In advance!
Tom Ferguson - 18 May 2004 14:37 GMT
Font metrics data is in the TrueType or OpenType font file. I know of no
easy way of accessing it. A font editor such as FontLab is one possibility.
Also you would need some knowledge of the font file structure and where and
how the various font dimensions are expressed in the file.

You could start here:
http://www.truetype.demon.co.uk/ttspec.htm
http://www.microsoft.com/typography/default.mspx

Hope this helps.

Tom
MSMVP-DTS

>  In the Microsoft Word, the size of a Character is related to its "Font
> Size" . But I found that, with the same "Font Size", the size of the
[quoted text clipped - 3 lines]
> Symbol?
>  Thanks In advance!
chenfeng - 19 May 2004 05:18 GMT
Thanks very much, I will try it.
> Font metrics data is in the TrueType or OpenType font file. I know of no
> easy way of accessing it. A font editor such as FontLab is one possibility.
[quoted text clipped - 17 lines]
> > Symbol?
> >  Thanks In advance!
Tim Murray - 22 May 2004 19:03 GMT
>   In the Microsoft Word, the size of a Character is related to its "Font
> Size" . But I found that, with the same "Font Size", the size of the
> character is changing when set "Bold","Italic" or "superscript" Format.
> In another way,
>   Can someone tell me: How to get the exact size of a formated character or
> Symbol?

I wonder if you are looking for a value that doesn't exist. Here is what I
mean.

The bold of a particular font may be drawn such that the extra weight gives
it a tiny bit more height than its nonbold version, while the bold strokes of
another font may be designed more along the interior, thus not giving it
extra height. Is one *really* larger?

Same for italic-- some tend to look shorter in height.

Superscript ... well, I'm wondering why you would ask....

About Symbol: If you are applying bold or italic to the specific Symbol font,
it's not a real font... we call them faux fonts. Word has bolded it or
slanted it for you. Note that faux fonts are subject to failure during print.
They may print fine one day and fail the next.
chenfeng - 24 May 2004 07:58 GMT
 The "Bold" and "Italic" of a particular font don't have a influence on the height, but have a tiny infulence on the width. For example, there are 80 ASCII characters in a line. When all characters are set "Bold", there number of characters in a line has changed to 79 characters, and another character hased moved to the next line. So I konw the width of character must have changed when set "Bold", "Italic" and "superscript".
 Except that, I have an other question: "How to get the width of a symbol ? " I konw the width of a symbol is connected to the symbol font, and the width is not solely connected the size. For example, a symbol size is set to 12 points, the actual width may be much smaller.

> >   In the Microsoft Word, the size of a Character is related to its "Font
> > Size" . But I found that, with the same "Font Size", the size of the
[quoted text clipped - 19 lines]
> slanted it for you. Note that faux fonts are subject to failure during print.
> They may print fine one day and fail the next.
Tom Ferguson - 24 May 2004 18:52 GMT
"How to get the width of a symbol ? "

I don't know the answer to the question you ask because, in part, I don't
know exactly what measurement you want when you refer to "font size" above
or "width of a symbol".

Please allow me to outline some basic concepts. I hope to at least answer
some aspect of your question. I am doing this rather informally.
Typographers would be horrified, I am sure.

Each character, in data abstraction, is referred to as a glyph. This
relationship, character as to glyph is similar to the relationship as
between number as to numeral. Each glyph is imagined to be positioned inside
a box, a "bounding" box, to be precise. All glyphs in a font are considered
to be inside such a box of the same size. This idea goes back to the days of
movable metal type. Then, the "bounding box" had a visible reality. It was
the size of the rectangular, working end of the metal used to impress the
paper.

Each glyph is positioned inside this box. Because of differences in shape,
not all characters hit the sides of the box. Indeed, in some instances,
parts of glyphs might extend beyond in digital type. For the most part, all
glyphs are conceived-of to be the same size as seen by the eye, all upper
case the same size and all lower case the same size. To achieve this ideal,
characters are actually different sizes within the box.

So, it is not trivial to determine the exact dimensions of any particular
glyph. The data to do so is in the font file but it is not available
explicitly. In principal, code could be written to do it.

To print text, the rasteriser (whether the Windows rasteriser alone or with
involvement of Adobe Type Manager or files therefrom [Windows XP]) uses the
TrueType file to get applicable data to print; however, leaving aside
whether it calculates character dimensions, it does not output any
dimensions that are externally accessible. So, you can't get the dimensions
even by running a trial page image. A programmer might be able to write code
to hook into the system to do this but that is by no means trivial either.

To complicate matters further, there is hinting and kerning. Both influence
the spacing between characters as printed. Hinting, less so since the
difference is typically a pixel or two (to refer to measurements on a
screen). Kerning shifts the printing position and can cause bounding boxes
to overlap. Indeed, in Word, you can alter the printing position on a
character-by-character basis over quite a wide range.

Hope this is useful.

I have done some reading on the topic but am far from being an expert.
Anyone offering corrections or additions would be welcome.

Tom Ferguson
MSMVP-DTS

 The "Bold" and "Italic" of a particular font don't have a influence on the
height, but have a tiny infulence on the width. For example, there are 80
ASCII characters in a line. When all characters are set "Bold", there number
of characters in a line has changed to 79 characters, and another character
hased moved to the next line. So I konw the width of character must have
changed when set "Bold", "Italic" and "superscript".
 Except that, I have an other question: "How to get the width of a symbol ?
" I konw the width of a symbol is connected to the symbol font, and the
width is not solely connected the size. For example, a symbol size is set to
12 points, the actual width may be much smaller.
> On Tue, 18 May 2004 05:04:23 -0400, chenfeng wrote
> (in article <OlDc1dLPEHA.3348@TK2MSFTNGP09.phx.gbl>):
[quoted text clipped - 27 lines]
> print.
> They may print fine one day and fail the next.
peter - 24 May 2004 21:57 GMT
[[ This message was both posted and mailed: see
  the "To," "Cc," and "Newsgroups" headers for details. ]]

> "How to get the width of a symbol ? "

If you go to the afm tables that come with PS fonts, the widths are
there. I don't use TT fonts so I can't tell you anything about them.
Or you could open the font in Fontographer or Fontlab and get the
widths there.

> I don't know the answer to the question you ask because, in part, I don't
> know exactly what measurement you want when you refer to "font size" above
[quoted text clipped - 46 lines]
> Tom Ferguson
> MSMVP-DTS

A good explanation Tom.
As a bit of background info - in metal type some characters hung
outside the body of the type, especially in some italic and script
typefaces.
These overhanging parts are called the kern of the character; that's
where the terminology of kerning comes from. If you can imagine an
italic f - I'm not going to attempt an ascii version of this. The
bottom of the f (which is slanted) hung over the left-hand side of the
body, and the top of the f hung over the right-hand side of the body.
So if the f was followed by another f, or an i, or an l, then those two
characters would be replaced by the appropriate ligature. Or else the
compositor (or Monotype keyboard operator) would use shoulder-high word
spaces to support the overhanging kern of these characters.
Unfortunately, digital type (and before that photo type) can be
manipulated at will (both horizontally and vertically, and in some
software even slanting). Actually, manipulated is the wrong word -
distorted would be better.

But this is getting away from the original question.

Peter
chenfeng - 27 May 2004 08:04 GMT
Thanks very much for your help! And I am sorry for my poor english.
The exact dimensions of any particular symbol are defined in the related
font file. More ever,  "Bold", "Italic", "Subscript" and "Superscript" have
effect on the width of a character, which are also defined in the font file.
I achieved to read the need width by using a class of Delphi, Which is
called "TCanvas". The following is a example:
var Canvas      : TCanvas;
      notUsed    : HWND;
     CharWidth : integer;
 Canvas                   := TCanvas.Create;
 Canvas.Handle        := GetDeviceContext(notUsed);
 Canvas.Font.Name := 'Symbol';
 Canvas.Font.Size    := 12;//points
 CharWidth              := Canvas.TextWidth(#50);
 Canvas.Font.Style   := [fsBold];
 CharWidth              := Canvas.TextWidth(#50);

> [[ This message was both posted and mailed: see
>    the "To," "Cc," and "Newsgroups" headers for details. ]]
[quoted text clipped - 78 lines]
>
> Peter
Tom Ferguson - 27 May 2004 17:43 GMT
Excellent! I am glad you found a solution.

Tom
MSMVP-DTS

> Thanks very much for your help! And I am sorry for my poor english.
> The exact dimensions of any particular symbol are defined in the related
[quoted text clipped - 117 lines]
>>
>> Peter
mail@albumsfamily.com - 28 May 2004 02:32 GMT
Download AlbumFamiy software at http://www.albumsfamily.com to help you
sunlei6662003@hotmail.com - 28 May 2004 06:46 GMT
Download AlbumFamiy software at http://www.albumsfamily.com to help
you
With its Image Browser, you can manage your images as easily as you
can imagine; its Image Viewer shows your images in the most advanced
Virtual Album; the PhotoEdit and Photofun functions give you wide room
to adjust your images and make all kinds of prints such as postcards,
cards, stationery and so on; what's more, the Bundled Functions allow
you to scan images and send images to your specified destination just
by a single click. With AlbumFamily, You can establish the most
beautiful albums for yourself, your family and your friends, you can
produce your own style stationery on your desk. You will never find
another application software which fits you so well and satisfy you so
much!
chenfeng - 30 May 2004 17:58 GMT
Thanks very much, I will try it!
> Download AlbumFamiy software at http://www.albumsfamily.com to help
> you
[quoted text clipped - 9 lines]
> another application software which fits you so well and satisfy you so
> much!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.