Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.formatting.longdocs
macropod macropod is offline
external usenet poster
 
Posts: 1,002
Default How does MS Word arrange the inter word space?

Hi all,

FWIW, I posted some code recently in microsoft.public.word.printingfonts to extract the (standard) character widths for the ASCII
character set.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"Jonathan West" wrote in message ...

"LeroyLi" wrote in message oups.com...

I agree that Word will expand the remaining space equally. Yet there
remains a problem: how dose Word determin the original spaces between
two words when there is no need to expand spaces?
I have worked on this these days, and guessed that these original
spaces is defined in the TrueType font which is the MS' default font.



Not quite. It is defined by the space character of whatever font is presently in use. So unexpanded space varies according to the
font face and size.

Now I need to read the Times New Roman font file to find the original
spaces. Oh, God! I need to find some introduction or specification to
help me. This is really a heavy work.


Not just TNR. Whichever font is in use.

You can get the width of a space relatively easily in Word. You can use the
Selection.Information(wdHorizontalPositionRelative ToPage) property to get the position of the cursor when positioned to the left
of the space, and again with the cursor positioned to the right of the space. The difference between the two values is the width
of the space in points. You will find that the space width does differ depending on which font the text is formatted with.


You could build a library of space widths for various fonts and use that rather then calculate every time. You could also get the
width of space for a large font size (e.g. 72pt) and divide down for smaller sizes of the same font.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I select English (UK) as default language on inter. keyboar dinbangkok Microsoft Word Help 10 September 10th 06 05:34 AM
How do i re-arrange different points into paragraphin MS-word swaroop Microsoft Word Help 2 May 22nd 06 12:44 PM
Mail merge from inter/intranet Claus Mailmerge 2 November 17th 05 01:13 PM
How do you arrange list alphabetically in word '97? Don Microsoft Word Help 2 July 12th 05 07:59 PM
Arrange word folder icons Monty Microsoft Word Help 2 January 25th 05 11:45 PM


All times are GMT +1. The time now is 07:19 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"