]> git.cworth.org Git - cworth.org/blobdiff - src/cairo/a_chain_of_bugs.mdwn
Reduce headers by one level
[cworth.org] / src / cairo / a_chain_of_bugs.mdwn
index 1991c0dba6f1758e5935901039b22d595e361a7c..8b52b69991b1b8b8f4d94bf1b8b4dcf5811f646c 100644 (file)
@@ -1,5 +1,7 @@
 [[meta title="A chain of bugs"]]
 
+[[tag cairo]]
+
 With cairo's recent 1.6.4 release, we've hoped to reach the nirvana of
 applications that display and print documents with perfect
 fidelity. Unfortunately, reality isn't always as pleasant as we would
@@ -9,7 +11,7 @@ like. I recently received a bug report that Firefox 3 (using cairo
 reveals at least three independent problems that conspire to give the
 bad results.
 
-# Bug 1: Firefox+cairo uses image fallbacks for table borders
+## Bug 1: Firefox+cairo uses image fallbacks for table borders
 
 First, here's the simplest web page I was able to construct to show
 the problem, (nothing more than a single-cell table with a border):
@@ -33,7 +35,7 @@ Also, note that when cairo puts the fallback images into the PDF file
 it uses a "knockout group" to do so. This is a particular PDF
 construct that I'll discuss later.
 
-# Bug 2: Poppler+cairo expands knockout groups to full-page fallbacks
+## Bug 2: Poppler+cairo expands knockout groups to full-page fallbacks
 
 Next, we can use the poppler library, (with evince or a pdf2ps
 utility), to read the PDF file and use cairo to generate a PostScript
@@ -50,9 +52,9 @@ rendering models.
 To explain a bit, (but ignoring many gory details), a PDF knockout
 group can be a very complicated thing, so poppler has some fairly
 sophisticated code to handle these. This support involves rendering
-everything in the group twice and then using cairo's DEST_OUT and ADD
+everything in the group twice and then using cairo's `DEST_OUT` and `ADD`
 compositing operators to properly combine them. Well, PostScript can't
-do fancy compositing like DEST_OUT and ADD, so of course cairo falls
+do fancy compositing like `DEST_OUT` and `ADD`, so of course cairo falls
 back to image-based rendering for things. The irony here is that the
 only reason cairo is using a knockout group in the original PDF file
 is to _prevent_ any compositing from happening, (the fallback image
@@ -66,7 +68,7 @@ fix poppler to recognize this case and ask for the simple thing from
 cairo's PostScript backend so that we don't get this full-page fallback
 explosion.
 
-# Bug 3: Cairo uses the wrong resolution for fallback images (in groups)
+## Bug 3: Cairo uses the wrong resolution for fallback images (in groups)
 
 If it were only for those first two bugs, the intermediate file sizes
 would have been larger than normal, but the final result would have