[cairo] Progress on cairo-based "print to PDF" from Mozilla

Carl Worth cworth at cworth.org
Mon Jun 19 16:01:00 PDT 2006


On Tue, 13 Jun 2006 15:05:59 -0700, Carl Worth wrote:
> http://cairographics.org/~cworth/images/minefield-type3.pdf
> 
> There is some good, some bad in that image. Here are a few things to
> note. The "Bad" things here are all bugs that should block the release
> of cairo 1.2. I'd love to have some help at knocking a couple of these
> off.
> 
> First page
> ----------
> Bad:  The first page is an image fallback, but there's no good reason
>       for it to be, (and the last time I ran this test it wasn't). So
>       there's been some regression in the PDF capability analysis.
> 
>       Effort to fix: Very minor (I'll do this)

This only took a little bit of work to track down, and once I did that
it was as trivially easy to fix as I had hoped. Here's the commit of
interest:

http://gitweb.cairographics.org/?p=cairo;a=commit;h=a3f2d92f11a1ab4d30dd0e33a0cd5ee19495eeb1

And here's the current result of our minefield test:

http://cairographics.org/~cworth/images/minefield-no-fallback.pdf

(this includes the truetype subsetting which we merged in since my
mail on this subject last week). Compared to the old -type3.pdf file
mentioned above, this new file is much snappier in a viewer like
evince, (no more giant image to bog it down), and is only about 238 kB
compared to the previous 1507 kB, (not that it's sufficiently small
yet, but it's definitely a lot better without the giant image).

> Bad:  The text in the four corners of the first page is being rendered
>       at a tiny scale. This looks like I just missed a case when I did
>       the recent set_fallback_resolution work.
> 
>       Effort to fix: Minor (I'll do this)

I was able to reproduce this easily in a small test case, (just change
test/fallback-resolution to select a bitmapped font). It's not yet
obvious what's going wrong before. Jinghua Luo, you were working on
the code for scaling bitmapped glyphs recently, correct? Could you
perhaps take a look at this problem?

> Second page
> -----------
> Bad:  If you zoom in a fair amount on the glyphs on this page you'll
>       see that some have odd shapes, (notice 'r' and 'c' for
>       example). It appears that the glyphs are being hinted at the
>       wrong DPI somewhere, (but ideally there would be no hinting
>       applied at all for glyphs being output to PDF).
> 
>       Effort to fix: Unknown (someone want to look into this?)

When the truetype or type1 subsetting code kicks in, this problem is
hidden, but I still think it's worth fixing. Behdad said he would look
into this.

> Bad:  You'll notice that the small text in the four corners of this
>       page is showing up as black boxes instead of the real
>       text.

I'm currently working on this one. It's easy to reproduce with a
minimal test case, (just drawing any text to a PS/PDF surface with a
bitmapped font).

So those are three bugs at least that need to be fixed before the 1.2
release, (would be nice to fix the broken selection stuff as well, but
if that doesn't happen it should be easy to rip out the truetype
subsetting code instead).

Meanwhile, we've just started using the "blocker" value of the
severity field in bugzilla to indicate bugs that must be fixed before
the release. That list currently has 4 other bugs on it:

	http://tinyurl.com/r4c5h [*]

People should feel free to nominate any other major cairo bugs, (in
particular, regressions from cairo 1.0 to cairo 1.1), as blockers for
the 1.2 release by setting the severity field in bugzilla.

-Carl

[*] https://bugs.freedesktop.org/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&product=cairo&product=libpixman&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&keywords_type=allwords&keywords=&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=NEEDINFO&bug_status=PLEASETEST&bug_severity=blocker&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&query_based_on=open+cairo%2Flibpixman+bugs&field0-0-0=noop&type0-0-0=noop&value0-0-0=
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060619/1d86e399/attachment.pgp


More information about the cairo mailing list