Sent by Jukka K. Korpela on 23 January 2005 19:07
In typography, spacing between characters is often adjusted due to
esthetic (and readability) considerations, such as
- reducing the spacing between "V" and "A" to avoid a gap
- adding some spacing between two "A" letters so that they
won't (nearly) touch each other
- adding spacing around an en dash character so that it does not
(nearly) touch the characters around it.
(We usually don't care about such issues in Web authoring. But sometimes
we might wish to, especially in logos, headings, and other important
texts.)
For the last case, assuming the data is 100–600,
the obvious attempt is something like
10<span style="letter-spacing:0.06em">0–6</span>00
which works OK on IE. On Mozilla, it also works but with an undesired side
effect, which becomes more obvious if the letter-spacing value is set to
something bigger.
The problem is that on Mozilla, setting letter-spacing for <span>ab</span>
does not increase only the spacing between a and b but also after b.
I cannot understand why, and still less do I see a workaround to this.
Considering "VA" or "AA", the observation is similar, but the spacing
(positive or negative) needed is so big that the Mozilla oddity becomes
fairly disturbing.
Another problem arises if I have something like "VAA", so that I would
like to reduce the spacing between the first two letters and increase the
spacing between the second and the third. Since <span> (or other) elements
cannot overlap, what can I do? I tried the artificial approach of putting
a zero-width space into the string (VA​A) so that I can add spacing
between it and the following letter, but this does not seem to work.
There's a simple demo page at
http://www.cs.tut.fi/~jkorpela/www/letter-spacing.html
Any ideas? There's the additional problem that according to some rumors,
Google pays attention to markup in the sense that markup inside a word
breaks it into peaces (<span>fo</span>o it treated as two words "fo" and
"o", not as a single "foo"), so it might be desirable to avoid such
markup. There's probably no solution to this dilemma at present:
fine-tuning character spacing is "expensive". But assuming we are willing
to do so, is there any hope of getting decent results?
--
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/