Closed Bug 397860 Opened 17 years ago Closed 16 years ago

SIL Graphite causes problems (Debian, pango-graphite, double width of spaces)

Categories

(Core :: Graphics, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.9.1b1

People

(Reporter: Aleksej, Assigned: karlt)

References

Details

(Keywords: regression)

Attachments

(2 files)

Debian GNU/Linux testing (lenny) i486, 64-bit “amd64” kernel.

Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9a9pre) Gecko/2007092704 Minefield/3.0a9pre and many before.
Thunderbird version 3.0a1pre (2007092704)

When pango-graphite 0.9.2-3 <http://packages.debian.org/lenny/pango-graphite> is installed, all the space characters are double wide (see screenshot).

Also, this warning appears multiple times:
** (gecko:28175): WARNING **: Exception in gr::RangeSegment


Some history with Minefield:

…
2006092504 - WFM, no warning
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2006-09-25+04%3A00&maxdate=2006-09-26+05%3A00&cvsroot=%2Fcvsroot
2006092604…2006100504 - WFM, 4 warnings
…
2006102104…2007010304 - WFM, 2 warnings
…
2007011404…2007012204 - WFM, no warning
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2007-01-22+04%3A00&maxdate=2007-01-23+05%3A00&cvsroot=%2Fcvsroot
2007012304…2007050804 - WFM, lots of warnings
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2007-05-08+04%3A00&maxdate=2007-05-09+05%3A00&cvsroot=%2Fcvsroot
2007050904…20070620 - in some parts of XUL and browser
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2007-06-20+04%3A00&maxdate=2007-06-21+05%3A00&cvsroot=%2Fcvsroot
20070621,2007062204  - in some parts of XUL
2007070304 - almost only in UI (also tried setting all fonts to DejaVu Sans)
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2007-07-03+04%3A00&maxdate=2007-07-04+05%3A00&cvsroot=%2Fcvsroot
2007070404…2007071704 - WFM
2007072304 - WFM (also tried setting all fonts to DejaVu Sans)
2007072504 - WFM
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2007-07-25+04%3A00&maxdate=2007-07-26+05%3A00&cvsroot=%2Fcvsroot
2007072604…2007081304 - happens everywhere
2007082404 - happens everywhere(?→), depends on the font
2007092504…2007092704 - happens everywhere (also tried setting all fonts to DejaVu Sans)

*everywhere includes the Profile Manager.


There are 2 open bugs about Graphite right now: bug 172260 and bug 320936.
I have no idea, which patch might have caused this, maybe roc knows more about this?
Keywords: regression
I don't really know, the timeframe might make it just a new-textframe thing. Someone just needs to debug it.
I just installed pango-graphite_0.9.2-3_i386.deb from http://packages.debian.org/lenny/pango-graphite/i386/download and restarted firefox, and have the same spacing issue. It's not increasing the amount of spaces, just increasing the length of whitespace for each space. I'm also getting this warning:

** (gecko:8265): WARNING **: Exception in gr::RangeSegment

at least 100 times in the terminal that I'm running this from.

I'm running Ubuntu 7.10 beta, and Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a9pre) Gecko/2007100209 Minefield/3.0a9pre ID:2007100209
When I uninstall the package, the spaces return to the normal length
Filed a bug on this in Debian's BTS: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=445185
Status: UNCONFIRMED → NEW
Ever confirmed: true
Still reproduced with the same pango-graphite and Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9b3pre) Gecko/2007121304 Minefield/3.0b3pre
I think this is happening due to the call to pango_font_find_shaper in gfxPangoFonts.cpp line 501: the implementation for PangoFcFont simply returns the first shaper that claims to cover the relevant script, without considering the engine's covers() function.  This causes Mozilla to call the Graphite shaper even for a non-Graphite font, which doesn't work very well.

I'll let someone else figure out whether this should be fixed in Mozilla or Pango....
Thanks, David.  Yes it looks like pango_fc_font_find_shaper should use
pango_map_get_engines and _pango_engine_shape_covers like get_shaper_and_font
in pango-context.c.

However gfxPangoFont::GetCharSize is not being used for complex characters and
so could(/should) just use pango_font_get_glyph_extents.
Assignee: nobody → mozbugz
Depends on: 449356
Depends on: 385263
No longer depends on: 449356
The changes that landed in bug 385263 have fixed this for pango-graphite-2.3 on Gentoo (http://bugs.gentoo.org/show_bug.cgi?id=209765).
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b1
Verified fixed on Debian GNU/Linux with:

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b1pre) Gecko/20080926211849 Minefield/3.1b1pre
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b1pre) Gecko/20080929020532 Minefield/3.1b1pre

as opposed to
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b1pre) Gecko/20080924020520 Minefield/3.1b1pre
Status: RESOLVED → VERIFIED
Was this fixed in xulrunner or pango-* package?
(In reply to comment #11)

Mozilla code is no longer using pango_font_find_shaper, so you could expect a fix in xulrunner-1.9.1b1.
You need to log in before you can comment on or make changes to this bug.