[css-text-decor] Emphasis marks and auto-hiding ruby annotation

# Xidorn Quan (2 years ago)

I have a question that, if the annotation of a character is autohidden, where should the emphasis mark be drawn for this character?

The current spec says:

If emphasis marks are applied to characters for which ruby is drawn in the same position as the emphasis mark, the emphasis marks are placed outside the ruby.

It reads to me that if the annotation is autohidden, the emphasis mark would be rendered immediately on top of the character, and in the same line as other annotations, is that correct?

To be more clear, the question is, if we have ruby like:

ふ がな 振り仮名

and we apply emphasis marks on it, which result makes more sense?

、、、、 ふ がな 振り仮名

or

、 、、 ふ、がな 振り仮名 ?

Contact us to advertise here
# Koji Ishii (2 years ago)

The situation can happen without auto-hide, and I saw both examples, so the spec avoids saying which specifically, only "emphasis marks come outside of ruby" (figure 9 of the spec[1].)

Authors may want to specify in future, or can live with either, I can't answer at this moment.

In my personal opinion, especially when the middle part is missing, the former (consistent position) looks better. On the other hand, if emphasis marks are on the whole paragraph, and only one character has ruby, the latter might look better. Choosing either by auto-hide or not might be one possible option.

[1] drafts.csswg.org/css-text-decor-3/#text-emphasis-position-property

/koji

2015-11-10 23:32 GMT-08:00 Xidorn Quan quanxunzhen@gmail.com:

# Xidorn Quan (2 years ago)

On Fri, Nov 13, 2015 at 4:32 PM, Koji Ishii kojiishi@gmail.com wrote:

The situation can happen without auto-hide, and I saw both examples, so the spec avoids saying which specifically, only "emphasis marks come outside of ruby" (figure 9 of the spec[1].)

Authors may want to specify in future, or can live with either, I can't answer at this moment.

In my personal opinion, especially when the middle part is missing, the former (consistent position) looks better. On the other hand, if emphasis marks are on the whole paragraph, and only one character has ruby, the latter might look better. Choosing either by auto-hide or not might be one possible option.

For the current ruby impl in Gecko, the former one is easier. I'm not sure how hard would it be to implement the latter one. So if it doesn't matter a lot, I'm going to implement the easier one for now.

Thanks for clarifying.

# fantasai (10 months ago)

On 11/13/2015 09:02 AM, Koji Ishii wrote:

On 11/11/2015 11:02 AM, Xidorn Quan wrote:> Hi, >

I have a question that, if the annotation of a character is autohidden, where should the emphasis mark be drawn for this character?

The current spec says:

If emphasis marks are applied to characters for which ruby is drawn

in the same position as the emphasis mark, the emphasis marks are

placed outside the ruby.

It reads to me that if the annotation is autohidden, the emphasis mark would be rendered immediately on top of the character, and in the same line as other annotations, is that correct?

To be more clear, the question is, if we have ruby like: ふ がな 振り仮名 and we apply emphasis marks on it, which result makes more sense? 、、、、 ふ がな 振り仮名 or 、 、、 ふ、がな 振り仮名 ?

The situation can happen without auto-hide, and I saw both examples, so the spec avoids saying which specifically, only "emphasis marks come outside of ruby" (figure 9 of the spec[1].)

Authors may want to specify in future, or can live with either, I can't answer at this moment.

In my personal opinion, especially when the middle part is missing, the former (consistent position) looks better. On the other hand, if emphasis marks are on the whole paragraph, and only one character has ruby, the latter might look better. Choosing either by auto-hide or not might be one possible option.

[1] drafts.csswg.org/css-text-decor-3/#text-emphasis-position-property

There was previous discussion on the positioning of emphasis marks in the presence of ruby. See www.w3.org/mid/AEB4771C-8ED0-49DD-B444-34F2BE54F85F@w3.org continuing at www.w3.org/mid/4D277EC5.2050607@w3.org, www.w3.org/mid/A592E245B36A8949BDB0A302B375FB4E201BF47330@MAILR001.mail.lan, www.w3.org/mid/510C6999.9050000@inkedblade.net

The conclusion was that the behavior illustrated in the spec is required, which is why we did not illustrate both options. :) See www.w3.org/mid/5136E94C.9010605@inkedblade.net

That said, I think auto-hidden ruby is a special case, and we should probably spec Gecko's behavior for that.

A related question is then, what about empty annotations? Should they match the behavior of auto-hidden ruby or non-annotated text?

CCing Murakami-san for thoughts. :)

~fantasai

# fantasai (10 months ago)

... repost with correct address, apologies for duplicate ...

On 11/13/2015 09:02 AM, Koji Ishii wrote:

On 11/11/2015 11:02 AM, Xidorn Quan wrote:> Hi, >

I have a question that, if the annotation of a character is autohidden, where should the emphasis mark be drawn for this character?

The current spec says:

If emphasis marks are applied to characters for which ruby is drawn

in the same position as the emphasis mark, the emphasis marks are

placed outside the ruby.

It reads to me that if the annotation is autohidden, the emphasis mark would be rendered immediately on top of the character, and in the same line as other annotations, is that correct?

To be more clear, the question is, if we have ruby like: ふ がな 振り仮名 and we apply emphasis marks on it, which result makes more sense? 、、、、 ふ がな 振り仮名 or 、 、、 ふ、がな 振り仮名 ?

The situation can happen without auto-hide, and I saw both examples, so the spec avoids saying which specifically, only "emphasis marks come outside of ruby" (figure 9 of the spec[1].)

Authors may want to specify in future, or can live with either, I can't answer at this moment.

In my personal opinion, especially when the middle part is missing, the former (consistent position) looks better. On the other hand, if emphasis marks are on the whole paragraph, and only one character has ruby, the latter might look better. Choosing either by auto-hide or not might be one possible option.

[1] drafts.csswg.org/css-text-decor-3/#text-emphasis-position-property

There was previous discussion on the positioning of emphasis marks in the presence of ruby. See www.w3.org/mid/AEB4771C-8ED0-49DD-B444-34F2BE54F85F@w3.org continuing at www.w3.org/mid/4D277EC5.2050607@w3.org, www.w3.org/mid/A592E245B36A8949BDB0A302B375FB4E201BF47330@MAILR001.mail.lan, www.w3.org/mid/510C6999.9050000@inkedblade.net

The conclusion was that the behavior illustrated in the spec is required, which is why we did not illustrate both options. :) See www.w3.org/mid/5136E94C.9010605@inkedblade.net

That said, I think auto-hidden ruby is a special case, and we should probably spec Gecko's behavior for that.

A related question is then, what about empty annotations? Should they match the behavior of auto-hidden ruby or non-annotated text?

CCing Murakami-san for thoughts. :)

~fantasai

# Shinyu Murakami (6 months ago)

fantasai fantasai.lists@inkedblade.net wrote on 2016/12/27 21:35:26

On 11/13/2015 09:02 AM, Koji Ishii wrote:

On 11/11/2015 11:02 AM, Xidorn Quan wrote:> Hi, >

I have a question that, if the annotation of a character is autohidden, where should the emphasis mark be drawn for this character?

The current spec says:

If emphasis marks are applied to characters for which ruby is drawn

in the same position as the emphasis mark, the emphasis marks are

placed outside the ruby.

It reads to me that if the annotation is autohidden, the emphasis mark would be rendered immediately on top of the character, and in the same line as other annotations, is that correct?

To be more clear, the question is, if we have ruby like: ふ がな 振り仮名 and we apply emphasis marks on it, which result makes more sense? 、、、、 ふ がな 振り仮名 or 、 、、 ふ、がな 振り仮名 ?

The situation can happen without auto-hide, and I saw both examples, so the spec avoids saying which specifically, only "emphasis marks come outside of ruby" (figure 9 of the spec[1].)

Authors may want to specify in future, or can live with either, I can't answer at this moment.

In my personal opinion, especially when the middle part is missing, the former (consistent position) looks better. On the other hand, if emphasis marks are on the whole paragraph, and only one character has ruby, the latter might look better. Choosing either by auto-hide or not might be one possible option.

[1] drafts.csswg.org/css-text-decor-3/#text-emphasis-position-property

There was previous discussion on the positioning of emphasis marks in the presence of ruby. See www.w3.org/mid/AEB4771C-8ED0-49DD-B444-34F2BE54F85F@w3.org continuing at www.w3.org/mid/4D277EC5.2050607@w3.org, www.w3.org/mid/A592E245B36A8949BDB0A302B375FB4E201BF47330@MAILR001.mail.lan, www.w3.org/mid/510C6999.9050000@inkedblade.net

The conclusion was that the behavior illustrated in the spec is required, which is why we did not illustrate both options. :) See www.w3.org/mid/5136E94C.9010605@inkedblade.net

That said, I think auto-hidden ruby is a special case, and we should probably spec Gecko's behavior for that.

A related question is then, what about empty annotations? Should they match the behavior of auto-hidden ruby or non-annotated text?

I agree that the Gecko's behavior is pretty good, and I think the emphasis mark position should be consistent within a ruby element (empty annotations should match the behavior of auto-hidden).

So both <em>ああ<ruby><rb>振<rb>り<rb>仮<rb>名<rt>ふ<rt>り<rt>が<rt>な</ruby>ああ</em> (auto-hidden ruby annotation for "り") and <em>ああ<ruby><rb>振<rb>り<rb>仮<rb>名<rt>ふ<rt><rt>が<rt>な</ruby>ああ</em> (empty ruby annotation for "り") should have the same result:   、、、、 、、ふ がな、、 ああ振り仮名ああ

I think this behavior is reasonable for readability, and also because of the ruby layout structure (similar to the table structure, the cell position in a row should not change when a cell in the previous row is empty).

-- Shinyu Murakami Founder & CTO, Vivliostyle Inc.

# r12a (6 months ago)

I raised an issue in the jlreq repo asking for requirements to be added related to this.

See w3c/jlreq#8

ri

# fantasai (a day ago)

On 04/08/2017 04:54 AM, Shinyu Murakami wrote:

fantasai fantasai.lists@inkedblade.net wrote on 2016/12/27 21:35:26

On 11/13/2015 09:02 AM, Koji Ishii wrote:

On 11/11/2015 11:02 AM, Xidorn Quan wrote:> Hi, >

I have a question that, if the annotation of a character is autohidden, where should the emphasis mark be drawn for this character?

In my personal opinion, especially when the middle part is missing, the former (consistent position) looks better. On the other hand, if emphasis marks are on the whole paragraph, and only one character has ruby, the latter might look better. Choosing either by auto-hide or not might be one possible option.

[1] drafts.csswg.org/css-text-decor-3/#text-emphasis-position-property

There was previous discussion on the positioning of emphasis marks in the presence of ruby. See www.w3.org/mid/AEB4771C-8ED0-49DD-B444-34F2BE54F85F@w3.org continuing at www.w3.org/mid/4D277EC5.2050607@w3.org, www.w3.org/mid/A592E245B36A8949BDB0A302B375FB4E201BF47330@MAILR001.mail.lan, www.w3.org/mid/510C6999.9050000@inkedblade.net

The conclusion was that the behavior illustrated in the spec is required, which is why we did not illustrate both options. :) See www.w3.org/mid/5136E94C.9010605@inkedblade.net

That said, I think auto-hidden ruby is a special case, and we should probably spec Gecko's behavior for that.

A related question is then, what about empty annotations? Should they match the behavior of auto-hidden ruby or non-annotated text?

I agree that the Gecko's behavior is pretty good, and I think the emphasis mark position should be consistent within a ruby element (empty annotations should match the behavior of auto-hidden).

So both <em>ああ<ruby><rb>振<rb>り<rb>仮<rb>名<rt>ふ<rt>り<rt>が<rt>な</ruby>ああ</em> (auto-hidden ruby annotation for "り") and <em>ああ<ruby><rb>振<rb>り<rb>仮<rb>名<rt>ふ<rt><rt>が<rt>な</ruby>ああ</em> (empty ruby annotation for "り") should have the same result:   、、、、 、、ふ がな、、 ああ振り仮名ああ

I think this behavior is reasonable for readability, and also because of the ruby layout structure (similar to the table structure, the cell position in a row should not change when a cell in the previous row is empty).

I have edited this into the spec as follows:

If emphasis marks are applied to characters

for which ruby is drawn in the same position as the emphasis mark,

the emphasis marks are placed outside the ruby.

Appending

This includes auto-hidden and empty ruby annotations.

Xidorn, please let me know if this works for you. :)

~fantasai

# Xidorn Quan (a day ago)

On Thu, Oct 19, 2017, at 12:43 PM, fantasai wrote:

On 04/08/2017 04:54 AM, Shinyu Murakami wrote:

fantasai fantasai.lists@inkedblade.net wrote on 2016/12/27 21:35:26

On 11/13/2015 09:02 AM, Koji Ishii wrote:

On 11/11/2015 11:02 AM, Xidorn Quan wrote:> Hi, >

I have a question that, if the annotation of a character is autohidden, where should the emphasis mark be drawn for this character?

In my personal opinion, especially when the middle part is missing, the former (consistent position) looks better. On the other hand, if emphasis marks are on the whole paragraph, and only one character has ruby, the latter might look better. Choosing either by auto-hide or not might be one possible option.

[1] drafts.csswg.org/css-text-decor-3/#text-emphasis-position-property

There was previous discussion on the positioning of emphasis marks in the presence of ruby. See www.w3.org/mid/AEB4771C-8ED0-49DD-B444-34F2BE54F85F@w3.org continuing at www.w3.org/mid/4D277EC5.2050607@w3.org, www.w3.org/mid/A592E245B36A8949BDB0A302B375FB4E201BF47330@MAILR001.mail.lan, www.w3.org/mid/510C6999.9050000@inkedblade.net

The conclusion was that the behavior illustrated in the spec is required, which is why we did not illustrate both options. :) See www.w3.org/mid/5136E94C.9010605@inkedblade.net

That said, I think auto-hidden ruby is a special case, and we should probably spec Gecko's behavior for that.

A related question is then, what about empty annotations? Should they match the behavior of auto-hidden ruby or non-annotated text?

I agree that the Gecko's behavior is pretty good, and I think the emphasis mark position should be consistent within a ruby element (empty annotations should match the behavior of auto-hidden).

So both <em>ああ<ruby><rb>振<rb>り<rb>仮<rb>名<rt>ふ<rt>り<rt>が<rt>な</ruby>ああ</em> (auto-hidden ruby annotation for "り") and <em>ああ<ruby><rb>振<rb>り<rb>仮<rb>名<rt>ふ<rt><rt>が<rt>な</ruby>ああ</em> (empty ruby annotation for "り") should have the same result:   、、、、 、、ふ がな、、 ああ振り仮名ああ

I think this behavior is reasonable for readability, and also because of the ruby layout structure (similar to the table structure, the cell position in a row should not change when a cell in the previous row is empty).

I have edited this into the spec as follows:

If emphasis marks are applied to characters

for which ruby is drawn in the same position as the emphasis mark,

the emphasis marks are placed outside the ruby.

Appending

This includes auto-hidden and empty ruby annotations.

Xidorn, please let me know if this works for you. :)

Yeah, it works for me, thanks.

Want more features?

Request early access to our private beta of readable email premium.