[css-inline] alignment of initial-letter for South Asian scripts without hanging baseline · Issue #864 · w3c/csswg-drafts · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-inline] alignment of initial-letter for South Asian scripts without hanging baseline #864

Open
dauwhe opened this issue Jan 6, 2017 · 8 comments
Labels
Closed Accepted by CSSWG Resolution Commenter Response Pending css-inline-3 Current Work i18n-ilreq Indic language enablement i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response.

Comments

@dauwhe
Copy link
Contributor

dauwhe commented Jan 6, 2017

What is the proper alignment for South Asian scripts that do not have the explicit hanging baseline, such as Tamil or Telugu?

@dauwhe dauwhe added the css-inline-3 Current Work label Jan 6, 2017
@dauwhe dauwhe added Needs i18n feedback i18n-ilreq Indic language enablement labels May 24, 2018
@xfq xfq added the i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response. label Apr 4, 2019
@r12a
Copy link
Contributor

r12a commented Aug 23, 2019

https://w3c.github.io/ilreq/#h_initial_letter_styling has some information about that. In particular the subsection at https://w3c.github.io/ilreq/#h_scripts_without_hanging_baseline

@fantasai
Copy link
Collaborator

Based on @r12a's references, it seems like the correct way to handle this would be to add a leading value (same keyword as text-edge in any case) which references the half-leading edges of the first/last N lines of an N-line drop-cap. Agenda+ to confirm adding this.

@fantasai
Copy link
Collaborator

Keep in mind the theoretical value model for initial-letter-align is <initial-letter-alignment-edges> <impacted-lines-alignment-edges>. This would add another possible value to the second set of values, not to the first.

@css-meeting-bot
Copy link
Member

The CSS Working Group just discussed South Asian initial-letter-align, and agreed to the following:

  • RESOLVED: add `leading` value to `initial-letter-align`, and get feedback to confirm it solves the issues for these scripts
The full IRC log of that discussion <fantasai> Topic: South Asian initial-letter-align
<fantasai> github: https://github.com//issues/864
<fantasai> https://w3c.github.io/ilreq/#h_scripts_without_hanging_baseline
<emilio> fantasai: in ^ we're not aligning ink-to-ink, we're aligning the top and bottom of the drop cap to the top and bottom half leading of the line
<emilio> fantasai: proposal is to add a value that does that
<emilio> fantasai: we have a value into text-edge for that called `leading`, which corresponds to that half-leading edge
<emilio> fantasai: so proposal is to reuse that name
<emilio> florian: this seems a reasonable solution to the problem, but I'm confused about the stated problem
<emilio> ... half-leading is very css-y, it's interesting to see typography using it
<myles> q+
<emilio> AmeliaBR: the diagrams don't seem to be talking about leading but about ascent and descent of the characters
<emilio> fantasai: there's ascent and ascent height in the diagrams. One of those two is our ascent and the other is something else.
<emilio> ... afaict our ascent is their ascent height
<emilio> ... if you argue that our ascent is their ascent then what is their ascent height?
<emilio> ... I'm pretty sure that what they're calling ascent is just the half-leading edge
<emilio> myles: is this a proposal to change the meaning of different metrics depending on the font or is this about adding a value to a property?
<emilio> fantasai: adding a value, to `initial-letter-align`
<emilio> astearns: there are some questions about whether this value solves the issue, maybe we should push it to another level?
<emilio> fantasai: we can go back to i18n and check whether it does but this is not a case of us not having a proper metric for this
<florian> q+
<emilio> ... I think we should add it and check with i18n whether it solves their problem
<emilio> myles: I don't want to weigh in about the particular metric, but can we have the behavior of auto to do the right thing?
<myles> https://developer.mozilla.org/en-US/docs/Web/CSS/initial-letter-align
<emilio> fantasai: we don't have an auto value for this
<emilio> myles: mdn says there's one (^^)
<emilio> fantasai: really?
<emilio> faceless2: I suggested adding one about 3 hours ago
<astearns> ack florian
<astearns> ack myles
<emilio> myles: I guess I should rephrase: if this is the expected way to do type setting we should make sure that it does the right thing by default
<faceless2> Bottom of https://github.com//issues/5244
<emilio> fantasai: yeah but we have another issue for that
<emilio> myles: I'm fine with that
<emilio> florian: this seems like the right way to do this if reality matches the diagram
<florian> I'd support an inline issue or note calling for feedback
<emilio> RESOLVED: add `leading` value to `initial-letter-align`, and get feedback to confirm it solves the issues for these scripts

@faceless2
Copy link

I've been doing some testing with this one too, attempting to match the image from the ILREQ link above, which I'll paste here for clarity:

image

That's the goal, and some initial testing has given me this:

image

That's aligning the baseline of the initial-letter with the baseline of the second line of the paragraph, and the cap-height of the initial-letter to the leading-top of the paragraph (indicated by the top-most blue line).

The alignment is significantly different because the top alignment point of the initial-letter is the cap-height. From the diagram, we'd need the top-alignment point to be the "dropcap median line". This is clearly not something that we can assume will align will the cap-height, and not an alignment point we can easily get from elsewhere.

So while I'm in support of adding the "leading" option to initial-letter-aign, on it's own not going to solve initial-letter sizing for Tamil or Telugu (or Kannada, which is the script used in this example).

@fantasai
Copy link
Collaborator

fantasai commented Aug 13, 2020

@faceless2 AFAICT the missing part of the solution is essentially needing to solve #5244 no?

@fantasai
Copy link
Collaborator

@r12a Thanks for ILREQ! We've added a value to the spec that tries to reproduce the required behavior. Note that we are missing metrics for the initial letter's top/bottom edges itself -- that's #5244. So, assuming we can get the correct top/bottom metrics for the initial letter glyph itself, what we're adding here is a leading value that matches those top/bottom metrics to the halfway-through-the-line-gap points above/below the impacted lines in the paragraph. I believe this is the behavior represented in ILREQ, can i18n confirm?

@faceless2
Copy link

faceless2 commented Aug 13, 2020

@fantasai yes I agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted by CSSWG Resolution Commenter Response Pending css-inline-3 Current Work i18n-ilreq Indic language enablement i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response.
Projects
None yet
Development

No branches or pull requests

8 participants