GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [css-ruby-1] Treatment of multiple Latin words in space-between & space-around · Issue #771 · w3c/csswg-drafts

[css-ruby-1] Treatment of multiple Latin words in space-between & space-around #771

New issue
Copy link
New issue
Copy link
Closed
Closed
[css-ruby-1] Treatment of multiple Latin words in space-between & space-around#771
Copy link
Labels
Closed Accepted by CSSWG ResolutionChanges backed by a CSSWG resolution.Changes backed by a CSSWG resolution.Needs Testcase (WPT)css-ruby-1Current WorkCurrent Workcss-text-4i18n-clreqChinese language enablementChinese language enablementi18n-jlreqJapanese language enablementJapanese language enablementi18n-needs-resolutionIssue the Internationalization Group has raised and looks for a response on.Issue the Internationalization Group has raised and looks for a response on.

Description

@r12a
r12a
opened on Nov 29, 2016
Issue body actions

https://drafts.csswg.org/css-ruby-1/#valdef-ruby-align-space-between

I think it would be useful to have some text, and perhaps another illustration, showing what would happen if you have more than one word in narrow-cell annotations. For space-between, my assumption is that if you have a two word annotation in Latin script over a longer base, the left edge of the word on the left would be flush with the left edge of the base, and the rightmost character of the other word would be flush with the right edge of the longer item.

The question is what happens between the two words. That could leave a good sized gap in the middle, which is what Firefox does, or cause the browser to stretch the inter-character spacing in order to reduce the gap between the words, which is what Edge does. There is a test for this at:
https://www.w3.org/International/tests/repo/run?base=css-ruby-1&batch=css-ruby&test=ruby-align-property/ruby-align-space-between-104.html

Are either of those correct, or is just one appropriate, or is it specifically undefined? Either way, i think the spec should say something.

Activity

Next
  1. r12a
    added
    css-ruby-1Current WorkCurrent Work
    i18n-trackerGroup bringing to attention of Internationalization, or tracked by i18n but not needing response.Group bringing to attention of Internationalization, or tracked by i18n but not needing response.
    on Nov 29, 2016
  2. upsuper commented on Dec 2, 2016

    @upsuper
    upsuper
    on Dec 2, 2016
    Member
    More actions

    I think Edge's behavior looks better, but I have no idea how that can be speced.

  3. fantasai commented on Dec 7, 2016

    @fantasai
    fantasai
    on Dec 7, 2016
    Collaborator
    More actions

    It's controlled by text-justify, so if the author or UA prefers inter-character spacing instead of inter-word, that can be specified.

  4. r12a
    added
    i18n-needs-resolutionIssue the Internationalization Group has raised and looks for a response on.Issue the Internationalization Group has raised and looks for a response on.
    and removed
    i18n-trackerGroup bringing to attention of Internationalization, or tracked by i18n but not needing response.Group bringing to attention of Internationalization, or tracked by i18n but not needing response.
    on Dec 8, 2016
  5. r12a commented on Feb 25, 2020

    @r12a
    r12a
    on Feb 25, 2020
    ContributorAuthor
    More actions

    For space-between, my assumption is that if you have a two word annotation in Latin script over a longer base, the left edge of the word on the left would be flush with the left edge of the base, and the rightmost character of the other word would be flush with the right edge of the longer item.

    I'm starting to think that this assumption derived from the spec text is incorrect, and that multiple word annotations in Latin text would simply be centred just like single word annotations.

    My previous assumption arose because of the mention of justification being applied. However, i'm inclined to think that justification is not appropriate if the annotation contains narrow characters (pinyin, english,... ) including spaces – the approach is simply to centre the text. That way, a space would not send two words to opposite sides of the annotation space.

    Note that space-around is the default value for ruby-align, so i think this divergent behaviour needs to be specified as standard for this value.

    Note that Firefox already does this by default if the language of the ruby element is zh-hans/t.

    I guess it would be helpful to ask the jlreq & clreq folks to confirm the expected behaviour.

  6. r12a
    added
    i18n-clreqChinese language enablementChinese language enablement
    i18n-jlreqJapanese language enablementJapanese language enablement
    on Feb 25, 2020
  7. r12a commented on Feb 25, 2020

    @r12a
    r12a
    on Feb 25, 2020
    ContributorAuthor
    More actions

    I guess it would be helpful to ask the jlreq & clreq folks to confirm the expected behaviour.

    For Chinese, the answer appears to be no justification is expected for multiple word annotations in narrow character text. See w3c/clreq#125

  8. fantasai commented on Feb 2, 2021

    @fantasai
    fantasai
    on Feb 2, 2021
    Collaborator
    More actions

    I think we might want to specify explicitly that text-justify: auto, when applied in the context of a ruby annotation, does not offer a justification opportunity on space characters. This would get us the right behavior, and the author could opt into either inter-character or inter-word spacing explicitly if that was wanted.

    For base text, though, I think it does need to be spaced out if the annotation is really long.

  9. r12a commented on Feb 5, 2021

    @r12a
    r12a
    on Feb 5, 2021
    ContributorAuthor
    More actions

    For base text, though, I think it does need to be spaced out if the annotation is really long.

    Yes. This is only about ruby text.

  10. himorin commented on Feb 15, 2021

    @himorin
    himorin
    on Feb 15, 2021
    Contributor
    More actions

    For JLReq side:

    • There was one missing Note in English version of simple-ruby (filed as Add note "グループ ルビと欧文用間隔" into English version also simple-ruby#53), which states 'base or annotation with Western word space' (nearly equal to multi-word text) is out of scope.
    • In JIS X 4051, rule of justification between base text and annotation does not use Western word space as adjustment (see issue Add note "グループ ルビと欧文用間隔" into English version also simple-ruby#53).
    • Seems no definition in JLReq.
    • In JLReq, one note mentions a case of using far shorter annotation than base text, and a way to set maximum size of leading and trailing spacing as half of base character could be taken for preventing misleading appearance (to tell a correct range of ruby base). See attached figure also.
    • In certain case of Japanese digital publishing (list of demands item 155; only in Japanese; see background etc. in cover page), expanding Western word space for justification between base and annotation is included. (similar to one upper item, use Western word space characters for 1-2-1 spacing)
    • In discussion within JLReq TF, no strong desire was pointed, but could be similar tendency to CLReq one.
    • There are multiple difficult open questions, such as which ones (spaces between words or intercharacter points) to use for adjustment, to align leading and trailing between base and annotation (or to have spacing up to half of width of base character, etc.), and we'd keep out of scope.
  11. fantasai
    added a commit that references this issue on Feb 16, 2021

    [css-ruby-1] Draft additional requirements for justification opportun…

    2d70050
  12. fantasai commented on Jul 12, 2022

    @fantasai
    fantasai
    on Jul 12, 2022
    Collaborator
    More actions

    Proposal:

    • Explicitly specify that text-justify: auto, in the context of a ruby annotation, does not offer a justification opportunity on space characters.
    • Authors can opt into either inter-character or inter-word spacing explicitly if that was wanted.
    • This does not apply to ruby base text.

    @r12a @himorin Do you think this would solve the problem?

  13. 1 remaining item

  14. r12a commented on Jul 20, 2022

    @r12a
    r12a
    on Jul 20, 2022
    ContributorAuthor
    More actions

    Do you think this would solve the problem?

    Seems good to me. Thanks.

  15. fantasai
    added
    Agenda+ TPAC
    on Sep 12, 2022
  16. fantasai commented on Sep 13, 2022

    @fantasai
    fantasai
    on Sep 13, 2022
    Collaborator
    More actions

    Additional notes from #779:

    • Also remove justification opportunities from bopomofo.
  17. SebastianZ
    changed the title [-][css-ruby-1] Treament of multiple Latin words in space-between & space-around[/-] [+][css-ruby-1] Treatment of multiple Latin words in space-between & space-around[/+] on Sep 14, 2022
  18. fantasai
    added
    Closed Accepted by CSSWG ResolutionChanges backed by a CSSWG resolution.Changes backed by a CSSWG resolution.
    Needs Edits
    on Oct 12, 2022
  19. css-meeting-bot commented on Oct 12, 2022

    @css-meeting-bot
    css-meeting-bot
    on Oct 12, 2022
    Member
    More actions

    The CSS Working Group just discussed default alignment of ruby text, and agreed to the following:

    • RESOLVED: Add text-justify:ruby, which is like 'auto' but disables justification oppo on spaces and bopomofo.
    • RESOLVED: `rt, rtc { text-justify: ruby; }` to UA stylesheet
    The full IRC log of that discussion <TabAtkins> Topic: default alignment of ruby text
    <TabAtkins> github: https://github.com//issues/771#issuecomment-1182339573
    <fantasai> https://github.com//issues/779
    <TabAtkins> fantasai: ruby text, when you put it on base text, it has different default alignment. latin text and bopomofo is centered, but cjk ruby, if the annotation is smaller than base, it'll be justified
    <TabAtkins> fantasai: Straightforward way to handle this is to say that ruby annotations are justified by default, and to adjust the jsutification opportunities
    <TabAtkins> fantasai: In nromal text we allow spaces to stretch, and inter-character for CJK
    <TabAtkins> fantasai: So if we create a justification method where sapces don't expand, but CJK still does, we'll get the intended behavior
    <TabAtkins> fantasai: And then people who want a different behavior can use text-justify: inter-word or inter-character if they want it
    <TabAtkins> fantasai: So proposal is to create this new jsutification mode
    <TabAtkins> fantasai: One, we could say text-justify:auto on ruby annotation has special behavior,
    <TabAtkins> fantasai: Two, we could introduce a new text-justify:ruby keyword, and use that in the UA stylesheet
    <TabAtkins> fantasai: Probably introducing a new keyword is a little more straightforward for impls
    <TabAtkins> Sounds reasonable to me, but I'm not a text ipmlementor. Also lean slightly toward new keyword.
    <TabAtkins> florian: I agree
    <TabAtkins> Rossen_: Can we have a res with a path forward, not open options?
    <TabAtkins> fantasai: Yes, one or the other
    <TabAtkins> Rossen_: So proposal to add new text-justify mode as a keyword
    <TabAtkins> fantasai: Yes, add text-justify:ruby. It disables justification opportunities on spaces and bopomofo, but otherwise is like 'auto'
    <TabAtkins> RESOLVED: Add text-justify:ruby, which is like 'auto' but disables justification oppo on spaces and bopomofo.
    <TabAtkins> fantasai: Also need a reoslution to apply it to rt and rtc in UA stylesheet
    <TabAtkins> Rossen_: Objections?
    <TabAtkins> RESOLVED: `rt, rtc { text-justify: ruby; }` to UA stylesheet
  20. css-meeting-bot
    removed
    Agenda+ TPAC
    on Oct 12, 2022
  21. xfq
    added
    css-text-4
    on Oct 25, 2022
  22. frivoal
    added
    Needs Testcase (WPT)
    and removed
    Needs Edits
    on Dec 28, 2022
  23. fantasai
    added a commit that references this issue on Dec 28, 2022

    [css-text-4][css-ruby-1] Define 'text-justify: ruby' to handle defaul…

    96545da
  24. frivoal
    closed this as completedon Dec 28, 2022
  25. frivoal commented on Dec 28, 2022

    @frivoal
    frivoal
    on Dec 28, 2022
    Collaborator
    More actions

    @r12a This has now been edited it. Review appreciated.

  26. jakearchibald
    added a commit that references this issue on Jan 16, 2023

    [css-text-4][css-ruby-1] Define 'text-justify: ruby' to handle defaul…

    e93765e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Closed Accepted by CSSWG ResolutionChanges backed by a CSSWG resolution.Changes backed by a CSSWG resolution.Needs Testcase (WPT)css-ruby-1Current WorkCurrent Workcss-text-4i18n-clreqChinese language enablementChinese language enablementi18n-jlreqJapanese language enablementJapanese language enablementi18n-needs-resolutionIssue the Internationalization Group has raised and looks for a response on.Issue the Internationalization Group has raised and looks for a response on.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.