-
Notifications
You must be signed in to change notification settings - Fork 31
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
How are underlines positioned in Arabic text? #86
Comments
I don’t recall any specific requirement for underlines in Arabic. Just two things comes to my mind:
Both of these make sense for Latin too, but are more important for Arabic. Is this helpful, or do we need serious study or documentation here? If this is enough, I can leave a similar comment there. |
i think it's a good start, but if you look at the link above you'll see that there are questions about: a. how to change the distance of the underline from the text, which brings in the question of what is the 'anchor' from which distance is measured? I'm guessing that for arabic that's the baseline, and that the baseline is the same as for latin text. There's also the question, does it make sense to adjust the distance between the text and the underline? and what is the default location of the baseline for Arabic script text? b. how to determine the thickness of the underline, and what the default should be? Are we able to find answers to those? |
oh, and we should also consider whether the underline position changes for a mixture of arabic and latin script text. If not, and if the default location is different, i assume that the arabic text underline position takes precedence for text in an Arabic context. btw, the CSS spec section that these questions are coming from is Line Decoration: Underline, Overline, and Strike-Through |
Added fonts and browsers which give the pictures above (see my previous comment). |
I took screenshots of a few more fonts with underline. Here is the list of the fonts as they appear in the images:
ChromeFirefoxSafariMore fonts could be added to the list, but it seems like it wouldn’t change the results. The behavior of each browser is more or less constant. |
Note that both Chrome and WebKit (Safari) don’t use underline position from the font, they calculates it on their own somehow (didn’t look in the code to see how exactly it is calculated, though). Firefox uses the underline position from the font, but clips it to the font descender. |
@khaledhosny Thanks for the info. So that’s why the height is variable in Firefox. We guessed that might be the case, but were not sure about it. |
This is an example of overline from a "The Holy Bible in Persian" with PDF available on openlibrary.org. Basically, the line is drawn above the height-of-ALEF, almost touching the tip of ALEF, but it's lower than the highest point of the KAF/KEHEH diagonal (Sarkesh) line. For this method, I assume, if the overline gets applied to any of the KAF family letters, it's better to skip-ink. |
We discussed underline/overline methods on the 7 February 2017 weekly meeting. Here's a summary:
|
Another area to cover is solid line (strike) through positioning. |
Ink skipping is employed for some letters with a longer descender (e.g. Ain ع and Meem م vs. Waw و or Reh ر ). The last underlined example is not ink-sipped, whereas it is elsewhere (almost the same text 7 lines before) |
Other example of underline position very low. (From a classical publication : collection of poems by Ahmad Chawki) Continuous line under all. |
Related issue: w3c/csswg-drafts#1288 |
|
Very interesting discussion. I just saw that now Google Chrome (since 57) is implementing this: text-decoration-skip: ink and in Canary it's enabled by default with text-decoration-skip-ink: auto. My question is how this underline and strikeouts behave in applications and programs like for example Adobe software? I have tested and it seems they use their own built-in settings. Could it be overridden by users? I did this and Adobe just doesn't care: |
See the addition to the ED for the Gap Analysis doc on the topic of underlines. It points to a new test rig for text-decoration that allows experimentation with the various CSS properties that are relevant. |
I've filed browser bugs for some of the issues arising from this confusion in https://bugzilla.mozilla.org/show_bug.cgi?id=1680610 and https://bugs.chromium.org/p/chromium/issues/detail?id=1155268 |
Related, this twitter thread https://twitter.com/KhaledGhetas/status/1334560119137447937 which includes skip-ink underlines so short that they are confused with dots, due to the underline positin being way too high and at the same height as the underdot. |
@Manishearth @svgeesus This thread is about the distance between the baseline and the underline. An issue that is more directly focused on the issue of skipped ink can be found at w3c/csswg-drafts#1288. |
@svgeesus correct, the issues I've filed on browsers deal with both: the underline positioning on some browsers on some OSes is really bad independently of skip-ink (which makes it worse) |
CSS and browser implementers are looking for information about how to position underlines for various scripts, including Arabic. Can we provide them with the information they need (and add it to the layout requirements doc)? See w3c/csswg-drafts#459 (comment)
The text was updated successfully, but these errors were encountered: