Forum Bugs

Bug with letter spacing and reporting missing characters.

jhellingman
While working with Prince 6.0 rev 6, I came across the following issues

1. Spurious space when using CSS letter-spacing

To reproduce: set letter-spacing to some wide value, e.g.:

.ls
{
letter-spacing:0.2em;
}

Use a piece of text between parentheses, e.g. (<span class=ls>Test</span>)

Expected result: (T e s t)

Actual result: ( T e s t)

(Note that IE does this right, FX has it wrong on the other side (T e s t ).

2. Repeat messages for missing characters in double column layout.

To reproduce: have a document with a character not present in the font being used; set document to double column format through CSS.

Expected: One error message per missing character

Actual: Many errors per missing character.

Document I discovered these issues with:

http://www.gutenberg.ph/previews/Franck-A.html

http://www.gutenberg.ph/previews/Franck-A.pdf
mikeday
Thanks for the tips! :)
mikeday
We've done some investigation, and it seems that Firefox, Opera, and Internet Explorer 6 and 7 all implement letter-spacing in a similar manner, adding space after the last character in a span. (Easily viewed when a span with letter-spacing is given a visible border).

Prince does not add letter-spacing after the last character, which seems better. The issue is what to do when the first character with letter-spacing follows an earlier character in another span, potentially with different or no letter-spacing. In the following two examples, should either of the 'b's be preceded by a gap:
.ls { letter-spacing: 1em }

<span>foo</span><span class="ls">bar</span>

<span class="ls">foo</span><span class="ls">bar</span>

Unfortunately the CSS 2.1 specification does not describe this situation, so user-agents must make up their own mind.
howcome
mikeday wrote:
We've done some investigation, and it seems that Firefox, Opera, and Internet Explorer 6 and 7 all implement letter-spacing in a similar manner, adding space after the last character in a span.


It can be argued that this is convenient -- it allows you to add extra letter-spacing without risking that the letter-spacing grows bigger than the word-spacing.

But I also agree that there should be possible to add space between letters without the trailing space.

This issue is probably best discussed on www-style and addressed in this specification:

http://dev.w3.org/csswg/css3-text/#letter-spacing