Skip to content

[css-inline] Arabic drop-caps #2399

Closed
Closed

Description

@fantasai

@behnam provided the necessary info in #698 (comment) to define shaping behavior, so we should spec it.

Activity

  1. added
    i18n-alreqArabic language enablement
    i18n-trackerGroup bringing to attention of Internationalization, or tracked by i18n but not needing response.
    on Apr 30, 2018
  2. fantasai commented on Dec 6, 2018

    @fantasai
    CollaboratorAuthor

    In #698 (comment) @jfkthame wrote:

    Sure, i understand that, but the example you give is not a particularly useful thing to do. I suspect that much of the time one will apply first-letter in order to change the formatting (see the image at #698 (comment)).

    We have https://drafts.csswg.org/css-inline-3/#initial-letter-shaping saying that

    When initial-letters is not normal, shaping should still occur across an inline initial letter box’s boundaries. ... For example, if the first letter of the Farsi word “پس” were styled with initial-letters: 2 1, both letters would be styled in their joined forms, with initial-form “ﭘ” as the initial letter, followed by the normally-styled final-form “ﺲ”. Note that the two letters might not always graphically connect, even when shaped in their joining forms. (my emphasis)

    But we have https://drafts.csswg.org/css-text/#boundary-shaping saying that

    Text shaping must be broken at inline box boundaries when any of the following are true for any box whose boundary separates the two typographic character units: Any of margin/border/padding separating the two typographic character units in the inline axis is non-zero. ...

    The two things seem to be contradictory, or at least to warrant some additional explanation.

    If the first letter is styled with a different font-size, font-family, etc it's entirely possible it won't actually connect to the next letter even when the appropriate contextual forms are used; I think that's what the emphasized sentence above is pointing out.

    Adding margin or border around the letter, OTOH, would be a cause for not shaping between the initial letter and following text.

    Raised caps are an interesting edge case, where I guess it's reasonable to maintain joining as the baseline isn't changed and no horizontal separation is being introduced (though it seems an unlikely thing for someone to really want to do in such a script).

    The few examples I've seen of traditional practice (see #698 (comment) and the linked discussion) don't appear to support shaping across more general drop-cap-like formatting: the large dropped, boxed initial in https://upload.wikimedia.org/wikipedia/commons/6/6a/Hafezeshamlu02.jpg, for example, is not shaped in an initial form.

  3. r12a commented on Dec 12, 2018

    @r12a
    Contributor

    The few examples I've seen of traditional practice (see #698 (comment) and the linked discussion) don't appear to support shaping across more general drop-cap-like formatting: the large dropped, boxed initial in https://upload.wikimedia.org/wikipedia/commons/6/6a/Hafezeshamlu02.jpg, for example, is not shaped in an initial form.

    Do we have a source which we believe is reliable that does show enlarged initial letters using joining forms? @behnam, @shervinafshar, @khaledhosny, @sahafshar, @ntounsi, @mostafa, any ideas?

  4. shervinafshar commented on Dec 12, 2018

    @shervinafshar

    @r12a, this topic has been bouncing around for a bit now. My personal take is that since this is a novelty of a typographical practice in Arabic script text, there is no reliable source. However, the research shows that (a) most cases of drop-caps in Arabic script texts are not using joining forms; (b) through my research on the matter, I believe that there is also some precedence for the drop-caps in Arabic script text to use of joining forms. This requires further investigation, but I reproduce the case that I'm referring to as a rare precedence.

    What follows is from the volume Compendium of Latin Translations of Persian Astronomical Tables, selected portions of Zīj-i Sultānī translated into Latin and published by Oxford University Press in 1655.

    image

    image

    Further pointers:
    – my thread on Persian Computing
    – Liam Quin's blogpost has a section with his findings, points to the thread above

  5. sahafshar commented on Dec 12, 2018

    @sahafshar
  6. r12a commented on Aug 23, 2019

    @r12a
    Contributor

    I wonder whether the answer here is to assume that by default arabic versals are not joining forms, but allow authors to turn them into joining forms using ZWJ if desired??

    In that case, would we need a special rule to say that ZWJ is kept with the preceding letter when using ::first-letter selection?

    (Btw, @sahafshar your image didn't seem to make it into the thread.)

  7. r12a commented on Jan 23, 2020

    @r12a
    Contributor

    Fwiw (perhaps not much) if you open this test in Safari (which is the only major browser i know of that supports initial-letter behaviour) you'll see that when selecting the first letter of a word where i had inserted ZWJ after the initial letter, ::first-letter automatically picked up the ZWJ and rendered the enlarged initial as a joining form.

    If there is no ZWJ (see this test) then the initial letter is unjoined, but the 2nd letter in the word is joined.

  8. svgeesus commented on Jan 24, 2020

    @svgeesus
    Collaborator

    @faceless2 a nice drop cap testcase for you

  9. fantasai commented on May 28, 2020

    @fantasai
    CollaboratorAuthor

    I'm inclined to spec the behavior @r12a describes in #2399 (comment) Happy to do something different if there's some clear consensus as to what's correct, though. :)

  10. jfkthame commented on May 28, 2020

    @jfkthame
    Contributor

    If there is no ZWJ (see this test) then the initial letter is unjoined, but the 2nd letter in the word is joined.

    @r12a When you say "but the 2nd letter in the word is joined", do you mean it takes a right-joining (medial or final) form, as if it were joined to the initial letter? Or just that it is joined to what follows it?

    (As far as I can see when testing here, it takes an initial form; i.e. it does not shape as though joined to the initial letter.)

  11. fantasai commented on May 28, 2020

    @fantasai
    CollaboratorAuthor

    Got an iOS screenshot I got from my friend... so it does look like Safari is breaking the connection on both sides.

    That said, using the correct connecting form between the second part of the word and the initial letter seems to me would be more readable than actually breaking this connection. Similar concept to how Latin drop-caps kern in the rest of the first word into the drop-cap, to help maintain a clearer connection between the first letter and the rest of its word.

    I also understand that using isolated form for a drop-cap just looks a lot better; that's probably why it's more common per @shervinafshar and @sahafshar’s comments.

    So basically we have three options here:

    • Break the connection on both sides: isolated form drop-cap, initial form rest of the word.
    • Connect both sides: Initial form drop-cap, connected (medial) form rest of the word.
    • Split model: Isolate drop-cap, connected (medial) form rest of the word.

    I think the third option is actually the best one. Curious to hear what native users of the writing system think.

    Here's a mockup of all three options, for reference:
    arabic-drop-cap

  12. sahafshar commented on May 28, 2020

    @sahafshar

    I agree @fantasai, the third option makes most sense to me. Sorry @r12a you're right, I forgot the reference picture in my original response on the thread. I've attached it here. As you can see, it also follows the same logic as the split model.
    Dropcaps

  13. fantasai commented on May 28, 2020

    @fantasai
    CollaboratorAuthor

    Tentatively updated the editor's draft with text for this behavior given @sahafshar’s confirmation. I'll wait on more feedback before closing the issue, though.

  14. faceless2 commented on May 29, 2020

    @faceless2

    This change isn't script-specific? Seems reasonable. Given how hard it was finding examples for arabic etc. I'm pretty sure we'd be basing a decision on a sample size of zero for N'Ko.

  15. fantasai commented on Jun 5, 2020

    @fantasai
    CollaboratorAuthor

    @faceless2 I think in the absence of conclusive information to the contrary, it should apply to all scripts. :) The principles that make it the most sensible option (see #2399 (comment)) are generally-applicable.

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 Editor DiscretionSee description in bin/issuegen.plcss-inline-3Current Worki18n-alreqArabic language enablementi18n-trackerGroup bringing to attention of Internationalization, or tracked by i18n but not needing response.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions