Note: There are a few cases of duplicates in user autocompletion which are being worked on.

inflated character spacing in svg file when harfbuzz is disabled

RESOLVED FIXED in mozilla10

Status

()

Core
Layout: Text
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: al_9x, Assigned: jfkthame)

Tracking

(Blocks: 1 bug)

unspecified
mozilla10
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
Fx 5.0.1, new profile

http://dnsviz.net/d/www.mozilla.org/dnssec/auth_graph.svg

likely related to Bug 667242

Fx 3.6 renders svg text (this bug) and prints (Bug 667242) properly without harfbuzz, and so should Fx >= 4.0 with harfbuzz disabled

see Bug 639185 for the reason to disable harfbuzz on XP
(Reporter)

Updated

6 years ago
Blocks: 690917
(Assignee)

Comment 1

6 years ago
Is this still a problem with the current release, or trunk builds? I tried FF7.0.1 on WinXP and did not see any spacing issues in the SVG file above.
(Assignee)

Comment 2

6 years ago
Ah, I _can_ reproduce this - my profile had a modified value for browser.display.auto_quality_min_font_size. If you set this to 0, does the problem go away?
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Reporter)

Comment 3

6 years ago
(In reply to Jonathan Kew (:jfkthame) from comment #2)
> Ah, I _can_ reproduce this - my profile had a modified value for
> browser.display.auto_quality_min_font_size. If you set this to 0, does the
> problem go away?

yes, also for Bug 667242 and Bug 682709

now that I know about this setting I would be inclined to set it high (if not for these bugs), since, like with harfbuzz, I actually want to turn off the fancy rendering features.
(Reporter)

Comment 4

6 years ago
one thing that's not clear to me, assuming no bugs, are there still advanced rendering features active, when harfbuzz is disabled, for auto_quality_min_font_size to affect?  Or should auto_quality_min_font_size make no difference when harfbuzz is disabled?
(Assignee)

Comment 5

6 years ago
(In reply to al_9x from comment #4)
> one thing that's not clear to me, assuming no bugs, are there still advanced
> rendering features active, when harfbuzz is disabled, for
> auto_quality_min_font_size to affect?  Or should auto_quality_min_font_size
> make no difference when harfbuzz is disabled?

With harfbuzz disabled, the issue comes down to whether we use Uniscribe to lay out the text, or just draw glyphs individually using GDI. In theory, Uniscribe could implement some effects such as ligatures or kerning, but I believe the standard version on XP does little or none of this for Latin script, at least, so it's quite likely you wouldn't see any difference.
(Reporter)

Comment 6

6 years ago
(In reply to Jonathan Kew (:jfkthame) from comment #5)
> (In reply to al_9x from comment #4)
> > one thing that's not clear to me, assuming no bugs, are there still advanced
> > rendering features active, when harfbuzz is disabled, for
> > auto_quality_min_font_size to affect?  Or should auto_quality_min_font_size
> > make no difference when harfbuzz is disabled?
> 
> With harfbuzz disabled, the issue comes down to whether we use Uniscribe to
> lay out the text, or just draw glyphs individually using GDI. In theory,
> Uniscribe could implement some effects such as ligatures or kerning, but I
> believe the standard version on XP does little or none of this for Latin
> script, at least, so it's quite likely you wouldn't see any difference.

So auto_quality_min_font_size switches between Uniscribe and GDI when harbuzz is disabled, setting it to 0 forces Uniscribe, which works, is that right?

Then it's individual GDI that's currently buggy?

What method does 3.6 use, Uniscribe?

When harfbuzz is enabled, what does auto_quality_min_font_size do:

a. modify harfbuzz?
b. switch between harfbuzz and uniscribe?
(Assignee)

Comment 7

6 years ago
(In reply to al_9x from comment #6)
> So auto_quality_min_font_size switches between Uniscribe and GDI when
> harbuzz is disabled, setting it to 0 forces Uniscribe, which works, is that
> right?

At sizes below auto_quality_min_font_size, we use the GDI path unless the text requires complex-script shaping.

> Then it's individual GDI that's currently buggy?

Apparently so.

> What method does 3.6 use, Uniscribe?

Both - but all this code has been extensively restructured since then, and it looks like something broke...

> When harfbuzz is enabled, what does auto_quality_min_font_size do:
> 
> a. modify harfbuzz?
> b. switch between harfbuzz and uniscribe?

c. Nothing.

(Actually, I think it still affects how we compute bounding rectangles, to determine areas that need repainting - they're more accurate once the font size exceeds auto_quality_min_font_size. But there's no effect on glyph layout behavior.)
(Assignee)

Comment 8

6 years ago
Created attachment 566145 [details] [diff] [review]
patch, ensure proper font is selected into the DC for GDI text layout

It looks like on XP, there are cases (at least in SVG text and when printing) where the DC doesn't have the right font preselected when gfxGDIFont::InitTextRun is called. So we should make sure it's selected here.

Those who are experiencing this bug: Please test with the tryserver build at https://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/jkew@mozilla.com-9d3ee39d7727/try-win32/ and confirm whether it fixes the problem.
Assignee: nobody → jfkthame
Attachment #566145 - Flags: review?(jdaggett)
(Reporter)

Comment 9

6 years ago
(In reply to Jonathan Kew (:jfkthame) from comment #8)
> Those who are experiencing this bug: Please test with the tryserver build at
> https://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/jkew@mozilla.com-
> 9d3ee39d7727/try-win32/ and confirm whether it fixes the problem.

Yes, new profile, gfx.font_rendering.harfbuzz.scripts=0, spacing is ok.

Updated

6 years ago
Attachment #566145 - Flags: review?(jdaggett) → review+
(Assignee)

Comment 10

6 years ago
Pushed to inbound:
https://hg.mozilla.org/integration/mozilla-inbound/rev/df77779b340e
Target Milestone: --- → mozilla10
https://hg.mozilla.org/mozilla-central/rev/df77779b340e
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.