W3C home > Mailing lists > Public > www-style@w3.org > November 1999

Re: word-spacing

From: Matthew Brealey <thelawnet@yahoo.com>
Date: Tue, 30 Nov 1999 07:41:13 -0800 (PST)
Message-ID: <19991130154113.19529.qmail@web903.mail.yahoo.com>
To: www-style <www-style@w3.org>
I wrote:

> I had this in one of my documents:

> This does not mean that he knows <em>what</em> he
> merely <em>that</em> he is.

> Since I had EM {font-style: italic}, the space
> 'what' and 'he' and 'that' and 'he' was smaller than
> would have liked.

> So should:
> EM {word-spacing: 1em} 
> have worked (it didn't in Opera)?

<blockquote title="New letter-spacing and word-spacing

Letter-spacing specifies the space between adjacent

Although the precise letter-spacing algorithm is left
to the user agent, we RECOMMEND that letter-spacing is
done between the bases of glyphs (or the base of the
glpyh's bounding box in the case of proportionally
spaced fonts) so that slanted (oblique) or italic text
looks appropriate.

This leaves kerning to the user agent, and permits
adjustment of letter-spacing to cater for text-align:

Values indicate the amount of additional space
desired, where 0 indicates no additional space.

Negative values are permissible.

If letter-spacing is set to <length>, the user agent
should not alter it in justifying text.


This alters the word-spacing of elements. Although
called word-spacing, it applies wherever there are
space separated characters, as in "1 2 3".

Essentially it is the same as letter-spacing, except
it applies only to spaces.

This leaves the word-spacing to the user agent.

This indicates the amount of white-space in addition
to the default.

Heading: Conflicts between values of letter and

It may happen that adjacent glyphs have different
values for letter and word-spacing.

In this case, as with vertical margins, the white
space is collapsed, the combined space being equal to
the most positive of the two when both are positive,
the most negative of the two when both are negative,
and the total of the two when one is negative and one

User agents should disregard the position of closing
tags for this purpose.

For example, given <span> some text</span><em> some
more text</em>, the user agent considers that there is
one space between text and some, and it would
determine the word-spacing based on the method stated

E.g., given:
SPAN {word-spacing: 1em;
font-size: 12pt;
letter-spacing: 2pt
EM {word-spacing: .5em; font-size: 32pt;
letter-spacing: 5pt}

the user agent would calculate the word-spacing as
12pt + 2 = 14pt and 16pt + 5pt = 21pt respectively,
and would apply 21pt, as it is the larger of the two.

Similarly, <span>T</span><em>h</em> would apply the
collapsing method to the letter-spacing.

Note that this requires the user agent to check either
side of the element to find whether the text is a word
or not.

From Matthew Brealey (http://members.tripod.co.uk/lawnet (for law)or http://members.tripod.co.uk/lawnet/WEBFRAME.HTM (for CSS))
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one place.
Yahoo! Shopping: http://shopping.yahoo.com
Received on Tuesday, 30 November 1999 11:02:53 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:52 UTC