ligatures enabled even when letter-spacing is non-zero

RESOLVED FIXED

Status

()

Core
Graphics
RESOLVED FIXED
9 years ago
7 years ago

People

(Reporter: Mr. Chen, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

9 years ago
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.
(Reporter)

Comment 1

9 years ago
Thank you for looking into it! :)

Updated

9 years ago
Component: Error Console → GFX: Thebes
Product: Firefox → Core
QA Contact: error.console → thebes

Comment 2

9 years ago
Created attachment 360024 [details]
html test page
Assignee: nobody → jmathies
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 3

9 years ago
confirmed - still happening in the latest nightlies.

Updated

7 years ago
Assignee: jmathies → nobody
Component: Graphics → Layout: Text
QA Contact: thebes → layout.fonts-and-text
Sounds like we're using a ligature; we shouldn't be doing that if letter-spacing is not "normal", right?
Yes, we have code that's supposed to prevent that; we pass the TEXT_DISABLE_OPTIONAL_LIGATURES when creating the textrun.

Comment 6

7 years ago
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

7 years ago
Note: with harfbuzz enabled the testcase renders properly.
Summary: letter-spacing for Calibri font is not displaying properly → ligatures enabled even when letter-spacing is non-zero

Comment 8

7 years ago
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.

Updated

7 years ago
Component: Layout: Text → Graphics
QA Contact: layout.fonts-and-text → thebes
Version: unspecified → Trunk
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.
Resolving this as FIXED because we're now using harfbuzz by default, which fixes the issue reported here.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
(Reporter)

Comment 11

7 years ago
Thanks!
You need to log in before you can comment on or make changes to this bug.