On Mar 24, 6:06 am, Axel Hecht <[EMAIL PROTECTED]> wrote: > Hi, > > is ZWNJ of the same breed as ZWSP? If so, I guess our Persian localizer > Behnam might have an opinion. > > Axel > > > > [EMAIL PROTECTED] wrote: > > On Mar 14, 4:11 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > wrote: > >> In the new textframe world, I've reorganized our implementation > >> ofwhitespacecollapsing. > > >> The situation is confusing because there are really three kinds > >> ofwhitespacecollapsing and elimination: > >> 1) Collapsing of multiple consecutive spaces (including spaces > >> consecutive across node boundaries) into one; the first space is > >> retained and all the others are eliminated. > > > Related to this I've run into a problem with ZWSP. HTML says that ZWSP > > should collapse with other whitespace: > >http://www.w3.org/TR/html401/struct/text.html#didx-white_space-1 > > > Currently we don't do this --- e.g. > > A​ ​ ​B > > Is rendered with two spaces. > > > If we try to do this, things get complicated because we need to track > > whether a run of whitespace is all zero-width whitespace (in which > > case it should collapse into a zero-width whitespace) or there's some > > non-zero-width whitespace (in which case it should collapse into a > > regular space). But the problem *then* is that we can no longer always > > retain the first space and eliminate the others. E.g. > > <span>​</span>​ Foo > > We don't know whether the ZWSP in the span survives or not until we > > encounter the first non-ZWSP after it. This makes life very > > uncomfortable. > > > Any thoughts on what the right thing to do is here? > > > Rob- Hide quoted text - > > - Show quoted text -
I was looking for an answer to a problem that IE7 has with ZWNJ and found this posting (have not tried other browsers yet). If you still have the question regarding ZWSP and ZWNJ, here is my understanding: Both characters produce the same visual effect (almost) Keep in mind that ZWSP is a space and may be adjusted by the justification routines (it is intended for line break control). However, ZWNJ is a formatting character and connects the characters around it. ZWNJ becomes part of the word causing the characters before and after it to shape in their proper form. When it comes to displaying Persian text in a browser, ZWNJ should be treated the same as ZWSP. Hope this helped. _______________________________________________ dev-tech-layout mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-layout

