w3c / iip

Documenting gaps and requirements for support of Indic languages on the Web and in eBooks.
https://w3c.github.io/iip/
9 stars 15 forks source link

Devanagari: 4.7.1 Baselines - add examples, define alignment behavior for each use case #44

Open alolita opened 6 years ago

alolita commented 6 years ago

See Section 3.6.1

Alignment behavior needs to be defined for each use case below:

Use case 1: Within one Indic script (Devanagari in this case) - if there are multiple words - the behavior will be alignment based on the Shirorekha even if the sizes of each word are different.

Use case 2: Within 2+ Indic scripts - the behavior needs to be defined. e.g. Odia + Hindi @vivekpani can you please confirm behavior and add w example

Use case 3: Latin + Devanagari - this use case needs real life usage examples. Based on usage, we will define correct behavior after evaluating examples. @vivekpani will add behavior

Use case 4: Latin + Devanagari + Indic without shirorekha - this use case needs real life usage examples. Based on examples, we will define correct behavior after evaluating examples. @vivekpani will add behavior

vivekpani commented 6 years ago

In writing in ruled papers, scripts with shirorekha are written with the shirorekha aligning to the top of the horizontal rules and other scripts align to the bottom. But, on screens, all scripts are made to align to the bottom. The bottom alignment is only for the base characters. The matras, vattus or tails that go below or above the base would be hanging below or over the top.

akshatsj commented 6 years ago

In addition to the alignment issue based on Shirorekha, the text in section 3.6.1 puts forth a different point. It talks about different fonts having different physical sizes for the same point size. Let me describe a scenario. Scenario: On a webpage, font A (say 12 pt size) is applied on Bengali text. Next word is in Devanagari on which font B (same 12 pt size) is applied. Say the said fonts are not embedded in the page and try to leverage the fonts present in the user's system (assuming they are present there). If both fonts A and B are not available on user's system who is viewing the webpage, the fallback mechanism will invoke default fonts for the respective scripts keeping the size requirement as same which we have assumed to be 12 pt size. The issue that arises in this very likely scenario is: not all fonts have same physical size for a given point size. This can show the text in a totally non-aligned manner. Here is a screenshot of Bengali text as seen in Shonar Bangla (default font in Windows for Bengali) font at 12 point size as compared to Devanagari text as seen in Mangal (default font in Windows for Devanagari) font at 12 point size. untitled Just flagging this as a potential issue. Who needs to resolve (font designers/OS vendors/browsers) needs to be discussed. Whether this can be resolved at all or not can also be debated.

r12a commented 6 years ago

Just flagging this as a potential issue. Who needs to resolve (font designers/OS vendors/browsers) needs to be discussed. Whether this can be resolved at all or not can also be debated.

Raising the issue, and describing the requirements are what we are tasked with. Fixing it comes later, and requires the involvement of lots of technology-specific experts. ;-)

r12a commented 6 years ago

I think there's also a relevant question about what happens if, even in the same font, text in two different font sizes appears side by side. (An extreme example of this is the 'drop caps' feature, where my understanding is that the shirorekha's should align despite the great disparity in size.)

litherum commented 6 years ago

Do you have an example of drop caps in Devanagari? That would be super interesting to see.

r12a commented 6 years ago

@litherum see https://github.com/w3c/iip/issues/43#issuecomment-434574137

r12a commented 6 years ago

@fantasai asks:

Wanted to know more about how each type of Indic script aligns text content of varying font sizes on a single line, and if there are any variations in the practice.