Open Bug 289130 Opened 21 years ago Updated 5 months ago

[css-text-4] Implement text-spacing property

Categories

(Core :: Layout: Text and Fonts, enhancement)

enhancement

Tracking

()

People

(Reporter: masayuki, Unassigned)

References

(Depends on 1 open bug, Blocks 2 open bugs, )

Details

(Keywords: css3, dev-doc-needed, intl, Whiteboard: [jp-reserve])

http://www.w3.org/TR/css3-text/#text-autospace-prop We should implement CSS3 text-autospace property for Japanese people.
Priority: -- → P5
As it stands now the CSS3 Text Module is going back to working draft... fantasai? So if you are planning to implement this it should be implemented as -moz-text-autospace unless this property has no issues.
Blocks: css-text-3
No longer depends on: 288439
No longer blocks: 156369
Depends on: 156369
At the tech plenary last week, Tatsuo Kobayashi of Justsystem mentioned that this behavior is defined in JIS X 4051, and said something about adding 1/3-spaces to either side of the latin/numerals... the old CSS3 Text drafts don't really give details on the behavior. Masayuki -- do you have access to a copy of the JIS X 4051:2004 standard?
(In reply to comment #2) > At the tech plenary last week, Tatsuo Kobayashi of Justsystem mentioned that > this behavior is defined in JIS X 4051, and said something about adding > 1/3-spaces to either side of the latin/numerals... the old CSS3 Text drafts > don't really give details on the behavior. What's 1/3-spaces? Does that mean 0.3em? or 1/3 of width of SPACE(U+0020)? # But I think that if we defines 'text-autospace-width' property, the page authors may be happy. Isn't this idea on your discussion? > Masayuki -- do you have access to a copy of the JIS X 4051:2004 standard? I don't have the spec. But I can buy it. Should I buy it? And I have a question. '[A]<span style="font-size: 2em;">english</span>' # [A] is a Japanese character. In this case, should we render which?: '[A] <span>english</span>' or '[A]<span> english</span>'
And there is a question: '<p style="text-autospace: none;"> [A]<span style="text-autospace: ideograph-alpha;">english</span> </p>' or '<p style="text-autospace: ideograph-alpha;"> [A]<span style="text-autospace: none;">english</span> </p>' In these cases, should we add extra space? I think that text-autospace should be only applied to block-level element.
It's 1/3 of an ideographic space, I think. The sizes are from hot-metal typesetting days, I'm told. I don't think text-autospace-width is necessary at this point.. and it might never be necessary. Another question is, are the spaces added to the text stream at the same level as text-transform or the same level as letter-spacing? I haven't actually spent much time thinking about this property yet. But you have brought up a lot of good questions. MSIE seems to have implemented it already, btw http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/textautospace.asp As for JIS X 4051, it will be necessary for implementing a lot of CSS3 Text related things. I don't know what's in it (I can't read Japanese) but it is referenced for pretty much anything relating to Japanese typography. *needs to learn Japanese*
Masayuki - Martin Heijdra and I ran across a PDF of an early draft, if that helps. http://www.tufs.ac.jp/ts/personal/kumihan/4051draft.pdf I have a physical copy of the spec itself, so I can scan sections you need from the final version if you give me the section title or so.
Thank you, fantasai. But I will buy it for our work.
I'm resetting bugs which are assigned to me but I'm not working on them and I don't have plan for fixing them in near future.
Assignee: masayuki → nobody
text-autospace / text-spacing has been delayed to CSS Level 4 as per the newest draft
Eager to support this attribute.
Note that the text-autospace property has been merged w/ text-trim into 'text-spacing' in September 2011 WD [1] and it has deferred to CSS Text Level 4 in the January 2012 WD [2] [1] http://www.w3.org/TR/2011/WD-css3-text-20110901/#recent-changes [2] http://www.w3.org/TR/2012/WD-css3-text-20120119/#recent-changes
I'll add the caniuse.com data.
No longer blocks: css-text-3
Summary: Should implement CSS3 text-autospace → Should implement text-spacing from CSS Text 4
Blocks: css-text-4
Severity: normal → S3

(Recent spec change here, FWIW - essentially the normal value now incorporates some trim-end behavior: https://github.com/w3c/csswg-drafts/issues/7055#issuecomment-1276421476 )

Chrome has been experimentally implemented. It is time to implement it.
https://developer.chrome.com/blog/css-i18n-features#inter-script_spacing_text-autospace

Spec in CSS Text 4: https://drafts.csswg.org/css-text-4/#text-autospace-property

Could you consider the priority? P5 is too underestimated.

Depends on: 1951795

(In reply to Fuqiao Xue [:xfq] from comment #15)

FWIW, the property has been refactored in Feb 2023: https://github.com/w3c/csswg-drafts/commit/29661048af03edf0c093f339e03afc41803c6238

In that change text-spacing got turned into a shorthand for text-spacing-trim and text-autospace. Therefore, I added bug 1951795 and bug 1869577 as blockers for this bug.

Sebastian

Depends on: 1869577
Summary: Should implement text-spacing from CSS Text 4 → [css-text-4] Implement text-spacing property
Priority: P5 → --
Whiteboard: [jp-reserve]
Depends on: 1977147
No longer depends on: 1977147
No longer depends on: 156369, 295483

Any progress on this?

The text-autospace property has just been enabled for Firefox 145 (see bug 1981086), though note that not all values are implemented yet (there's no support for punctuation or replace at this time).

I'm not sure it makes much sense to implement the text-spacing shorthand until text-spacing-trim (bug 1951795) is also available.

It's great to see progress, even if it's not fully supported yet. Great work, thank you!

You need to log in before you can comment on or make changes to this bug.