- From: Matthew Brealey <thelawnet@yahoo.com>
- Date: Tue, 30 Nov 1999 07:41:13 -0800 (PST)
- 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 is, > merely <em>that</em> he is. > Since I had EM {font-style: italic}, the space between > 'what' and 'he' and 'that' and 'he' was smaller than I > would have liked. > So should: > EM {word-spacing: 1em} > have worked (it didn't in Opera)? <blockquote title="New letter-spacing and word-spacing rules"> Letter-spacing: Letter-spacing specifies the space between adjacent glyphs. 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. Normal: This leaves kerning to the user agent, and permits adjustment of letter-spacing to cater for text-align: justify. <length> 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. word-spacing 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. normal This leaves the word-spacing to the user agent. <length> This indicates the amount of white-space in addition to the default. Heading: Conflicts between values of letter and word-spacing 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 positive. 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 above. 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