Last Comment Bug 156881 - (text-decoration-mode) Underline should skip character/part-of-character that is below the base line (text-decoration-mode)
: Underline should skip character/part-of-character that is below the base line...
: css3, intl, testcase
Product: Core
Classification: Components
Component: Layout (show other bugs)
: Trunk
: All All
: -- enhancement with 16 votes (vote)
: ---
Assigned To: David Baron :dbaron: ⌚️UTC-10
: Jet Villegas (:jet)
Mentors: Jeff Muizelaar [:jrmuizel]
: 64874 (view as bug list)
Depends on: 812990
Blocks: thai css-text-3
  Show dependency treegraph
Reported: 2002-07-11 06:20 PDT by Arthit Suriyawongkul
Modified: 2016-10-21 11:24 PDT (History)
24 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Thai underlined text (585 bytes, text/html)
2002-07-11 06:20 PDT, Arthit Suriyawongkul
no flags Details
Hindi underlining example (3.73 KB, image/gif)
2002-07-26 10:06 PDT, Prabhat Hegde
no flags Details
example of different underlining styles, using Thai/Latin text (17.05 KB, image/gif)
2002-08-06 12:36 PDT, Arthit Suriyawongkul
no flags Details
Message: Jiggy says “สูงสุดคืนสู่สามัญ” (11.08 KB, image/png)
2008-03-28 23:35 PDT, Disorn Homchuenchom
no flags Details

Description Arthit Suriyawongkul 2002-07-11 06:20:01 PDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0rc3) Gecko/20020614
BuildID:    20020614


in Thai text,
we need the line to skip all below-level part & tail of char
(also below-level char, like below vowel)

please see the attached testcase.

Reproducible: Always
Steps to Reproduce:
open attached testcase

Actual Results:
underline went across Thai base-level characters, also base-level part/tail of
Thai characters.

Expected Results:
underline skip Thai base-level characters, also base-level part/tail of Thai


also, in case of English text, e.g


when it went underlined,
should the line skip tails of "gyqj" ?
Comment 1 Arthit Suriyawongkul 2002-07-11 06:20:50 PDT
Created attachment 90952 [details]
Thai underlined text
Comment 2 Arthit Suriyawongkul 2002-07-11 06:29:36 PDT
Thai character has 4 levels of displaying.
from highest to lowest level:
 above (same level as accent mark of western)
 base  (same level as general western character)

list of below-level Thai character:

list of Thai character with "below-level part":

list of Thai character with "below-level tail":
Comment 3 Arthit Suriyawongkul 2002-07-11 06:32:31 PDT
some character like U+0E3A,
will be unseen if the underline striked over it.
Comment 4 David Baron :dbaron: ⌚️UTC-10 2002-07-11 20:33:41 PDT
This is, IMO, another deficiency of the underline definition in the CSS spec
(which we're moving towards in bug 1777), that we're not allowed to do this. 
(Or are we?)
Comment 5 Arthit Suriyawongkul 2002-07-11 21:10:58 PDT
propose new attribute to CSS ?
to let web developer able to choose style for underline ?

2 style options
 - strike out
 - skip over

seems this too hard -_-'
just my 2 satangs :|
Comment 6 Arthit Suriyawongkul 2002-07-11 21:48:46 PDT
(changed the summary to be more general)

example of Latin characters that has some part below the base line:

U+0067  g
U+006A  j
U+0070  p
U+0071  q
U+0079  y
U+00C7  Latin Capital Letter C with Cedilla
U+00FD  Latin Small Letter Y with Acute
U+00FE  Latin Small Letter Thorn
U+0104  Latin Capital Letter A with Ogonek
U+014B  Latin Small Letter Eng
Comment 7 Arthit Suriyawongkul 2002-07-11 22:03:21 PDT
comment #5 .. may be it's not clear.

possible options
1) not skip
2) skip only whitespace
3) skip only below-base-line part-of-character
4) skip whitespace and below-base-line part-of-character
Comment 8 Hixie (not reading bugmail) 2002-07-12 22:17:45 PDT
I think we are allowed to do this per the spec, actually. It counts the same as
changing the thickness to allow for subscripts, which the spec explicitly allows.

We should give feedback to the CSSWG that we want 'text-underline-mode' to have
a value which controls whether or not we skip descenders.
Comment 9 Arthit Suriyawongkul 2002-07-12 22:32:58 PDT
actually, i've sent an e-mail to yesterday,
not sure if it a good place to send to.
(i'm not subscribed to the list yet, so the msg may delayed)

i can fwd the e-mail to you on monday morning,
when i'm at the office and can access the sentbox :)

please comment on it, thanks.
Comment 10 Arthit Suriyawongkul 2002-07-12 22:38:30 PDT
list archive
Comment 11 Prabhat Hegde 2002-07-26 10:06:22 PDT
Created attachment 92925 [details]
Hindi underlining example

Shows input and output sequences and expected underlining. Pl ignore the boxes.

Comment 12 Prabhat Hegde 2002-07-26 10:08:24 PDT
Comment about attachment 92925 [details]
Indian language scripts (particularly South Indian languages) will have the same
issue. In addition could someone point me to the logic of underlining text? My
concern is that CTL (Complex Text Layout) scripts such as Thai, Hebrew, Arabic
require underlining to happen after the characters are shaped to account for
shaping as well as below-base characters. Pl see attached gif for hindi.
Comment 13 Arthit Suriyawongkul 2002-08-06 12:36:36 PDT
Created attachment 94217 [details]
example of different underlining styles, using Thai/Latin text

black: grapheme cluster WITH some part below the base line level.
grey: grapheme cluster without.
Comment 14 Arthit Suriyawongkul 2002-08-06 12:41:09 PDT
from attachment 94217 [details]
i think "skip-whole-cell" is the easiest to implement.
(note: i use the word (display) cell/grapheme cluster interchangably here .. sorry)
Comment 15 Boris Zbarsky [:bz] (still a bit busy) 2003-04-29 10:05:28 PDT
So if I have:

<span style="text-decoration: underline">
  <span style="vertical-align: -0.5em">text</span>
  more text

what should happen?  Should the same apply for overline and ascenders?  (Think
bigger font in the middle of an overlined inline.)
Comment 16 Hixie (not reading bugmail) 2003-04-29 10:30:50 PDT
Comment 17 Arthit Suriyawongkul 2005-03-01 12:18:51 PST
Similar issue in 

Underlining should optionally skip descenders and characters below baseline
Comment 18 Justin Kerk 2005-07-11 10:50:05 PDT
Isn't this a dupe of bug 64874?
Comment 19 fantasai 2006-03-09 04:30:55 PST
*** Bug 64874 has been marked as a duplicate of this bug. ***
Comment 20 Disorn Homchuenchom 2008-03-28 23:35:46 PDT
Created attachment 312441 [details]
Message: Jiggy says &ldquo;สูงสุดคืนสู่สามัญ&rdquo;

The problem still affects with current nightly build.
Comment 21 Arthit Suriyawongkul 2008-03-29 00:51:57 PDT
BugAThon Bangkok:

We all agreed that this bug is not a blocking bug for Thai support.
(i.e. just optional, good to have, but not necessary)
Comment 22 WulfTheSaxon [:Wulf] 2011-03-31 08:20:28 PDT
This seems more important with the new support for colored underlines.
Comment 23 Jeff Muizelaar [:jrmuizel] 2011-12-13 12:30:10 PST
I have a very rough idea of how to do this. If someone's interested in trying to fix it I can give some guidance. It would be good to prototype out an algorithm for breaking the underline first.
Comment 24 Aish 2013-04-18 07:08:29 PDT
I would like to work on this bug, i am good at c++. Please guide me through this
Comment 25 fantasai 2014-07-10 01:37:31 PDT
Aish, you should probably look over the CSS3 Text Decoration spec:
and maybe ping jrmuizel directly -- he seems to have not noticed your comment. :)
Comment 26 Xidorn Quan [:xidorn] (UTC+10) 2015-11-04 20:52:56 PST
It looks like this property has been removed from specs long ago. I cannot find it in any current draft. So close it.
Comment 27 Jeff Muizelaar [:jrmuizel] 2016-10-21 11:24:51 PDT
Bug 812990 supersedes this.

Note You need to log in before you can comment on or make changes to this bug.