Last Comment Bug 443853 - ligatures enabled even when letter-spacing is non-zero
: ligatures enabled even when letter-spacing is non-zero
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: x86 Windows XP
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-06 16:50 PDT by Mr. Chen
Modified: 2011-01-24 05:58 PST (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
html test page (260 bytes, text/html)
2009-02-01 15:24 PST, Jim Mathies [:jimm]
no flags Details
testcase, letter-spacing with various text (3.04 KB, text/html)
2010-07-20 22:22 PDT, John Daggett (:jtd)
no flags Details

Description Mr. Chen 2008-07-06 16:50:36 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0

<html>
<head>
	<title>
		Bug
	</title>

	<style rel="stylesheet" type="text/css">

        h2{
	font-family:"Calibri";
	letter-spacing:.5em;

        }

</style>
</head>
<body>
	<h2>Introduction</h2>
</body>
</html>

Reproducible: Always

Steps to Reproduce:
1.You type the code above and save it as a .html file.
2.Open it by Firefox.
3.The result is            I n t r o d u c ti o n
Actual Results:  
The actual result displayed by firefox:        I n t r o d u c ti o n

The t and i characters got sticked together.

Expected Results:  
The expected result should be there is a .5em space between each character. In other words  I n t r o d u c t i o n

The t and i characters got sticked together.

I tried using an external stylesheet file, the same bug is being produced.

I tried opening it using I.E., the proper display was shown.
Comment 1 Mr. Chen 2008-07-06 16:51:33 PDT
Thank you for looking into it! :)
Comment 2 Jim Mathies [:jimm] 2009-02-01 15:24:58 PST
Created attachment 360024 [details]
html test page
Comment 3 Jim Mathies [:jimm] 2009-02-01 15:26:54 PST
confirmed - still happening in the latest nightlies.
Comment 4 Boris Zbarsky [:bz] 2010-07-20 19:43:19 PDT
Sounds like we're using a ligature; we shouldn't be doing that if letter-spacing is not "normal", right?
Comment 5 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2010-07-20 20:56:14 PDT
Yes, we have code that's supposed to prevent that; we pass the TEXT_DISABLE_OPTIONAL_LIGATURES when creating the textrun.
Comment 6 John Daggett (:jtd) 2010-07-20 22:22:31 PDT
Created attachment 458914 [details]
testcase, letter-spacing with various text

Yes, it looks like we're not enforcing the breaking of ligatures when letter-spacing is non-zero.  Chrome shows the same problem when text-rendering: optimizeLegibility is set.
Comment 7 John Daggett (:jtd) 2010-07-20 22:23:47 PDT
Note: with harfbuzz enabled the testcase renders properly.
Comment 8 John Daggett (:jtd) 2010-07-20 22:46:51 PDT
Looks like only the CoreText and Harfbuzz code pays attention to the TEXT_DISABLE_OPTIONAL_LIGATURES flag.  Probably because Uniscribe doesn't provide an easy way of disabling only optional ligatures that I can find.  The Vista-and-beyond Uniscribe API's do but that's way too much work for code that harfbuzz will replace.

One option would be to force GDI shaping based on the TEXT_DISABLE_OPTIONAL_LIGATURES flag.  That's the reason this bug only shows up in text sized 20px and above in 3.6, up until 3.6 all text below 20px was rendered via the GDI shaping codepath.
Comment 9 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2010-07-20 22:55:56 PDT
I think we should just WONTFIX this bug as it pertains to Uniscribe and other non-Harfbuzz shapers and concentrate on getting Harfbuzz enabled as broadly as possible.
Comment 10 Jonathan Kew (:jfkthame) 2011-01-24 02:29:40 PST
Resolving this as FIXED because we're now using harfbuzz by default, which fixes the issue reported here.
Comment 11 Mr. Chen 2011-01-24 05:58:42 PST
Thanks!

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