The bug was that the bounding box of the image was computed by transforming
the vector (width,height) and then using 0,0,width,height as the bounding box.
This is obviously wrong. We use _cairo_matrix_transform_bounding_box() now.
This fixes the XFAIL test rotate-image-surface-paint.
and update reference images. This test was fixed some time ago
where I disabled type1 subsetting for vertical layouts, then
turned XFAIL again when Carl Worth didn't have the same fonts as me.
I've not updated reference images to work on FC6 and hoping that it
works for Carl too.
cairo-scaled-font-subsets stores two sets of subsets -
scaled and unscaled. The first time each glyph is mapped,
_cairo_scaled_glyph_lookup() is called to determine if
the glyph is bitmap or outline. Outline glyphs are put
in the unscaled subsets. Bitmap glyphs are put in the
scaled subsets. The unscaled subsets hash table keyed is
the scaled_font->font_face to ensure only one font for
each font face is created. The scaled subsets hash
table is keyed by scaled_font.
_cairo_scaled_font_subsets_create() now takes two arguments
to specify the maximum size of the scaled and unscaled subsets.
If the unscaled max size is set to 0 all glyphs are mapped
to scaled subsets.
A separate foreach function is provided for scaled and unscaled
subsets. The PDF and PS backends iterate over the unscaled
subsets to emit CFF, TrueType, and Type1 fonts. The scaled
subsets are iterated to emit Type3 bitmap fonts.
This is to make librsvg and poppler to use the compiled cairo instead
of whatever is on the system, such that the test suite does not depend
on a good version of cairo being installed already.
We now test for windows.h availability to automatically enable win32
backends. This nicely enables compiling cairo against libwine by just
setting CC=winegcc LD=winegcc during configure. This currently only
generates static libs though.
Adds some state, 'dash_starts_on', to keep track of whether a dashed path
starts with dash_on or not. This fixes the 'leaky-dash' bug (#4863) and
some other degenerate cases. The new version is, in my opinion,
considerably cleaner and more understandable than the old code.
Finally, the rewrite changes the behaviour of dashing to add degenerate
caps around corners that start at the same place as a dash begins. This
matches the behaviour seen in acroread.
This rewrite is based on an initial rewrite done by Jeff Smith.
has_initial_sub_path more accurately describes the condition we want to
track. This flag is used to indicate when an initial sub_path needs capping
but has no associated slope and thus no associated faces.
Commit 05ff2c77da contained
a fix for the acroread printing problem. However this
patch caused a problem for the Mac Preview PDF viewer.
http://lists.freedesktop.org/archives/cairo/2007-February/009615.html
This patch fixes the Mac Preview problem. The patch
- Adds a platform 3, encoding 0 cmap table
- Adds a post table that maps the glyph names in the
PDF truetype font dictionary (/g0 /g1 /g2 ...)
to glyph indices in the font.
We use a small cache of size 16 for surfaces created for solid patterns.
This mainly helps with the X backends where we don't have to create a
pattern for every operation, so we save a lot on X traffic. Xft uses a
similar cache, so cairo's text rendering traffic with the xlib backend
now completely matches that of Xft.
The cache uses an static index variable, which itself acts like a cache of
size 1, remembering the most recently used solid pattern. So repeated
lookups for the same pattern hit immediately. If that fails, the cache is
searched linearly, and if that fails too, a new surface is created and a
random member of the cache is evicted.
Only surfaces that are "compatible" are used. The definition of compatible
is backend specific. For the xlib backend, it means that the two surfaces
are allocated on the same display. Implementations for compatibility are
provided for all backends that it makes sense.
This was inadvertently changed as part of fdffde8b9e
With the Boolean, pango-using programs that locked the same
unscaled_font multiple times would crash with a message such as:
cairo-ft-font.c:569: _cairo_ft_unscaled_font_unlock_face: Assertion `unscaled->is_locked' failed.
This fixes a regression introduced with commit:
25a370d799
This was showing up as a failure of the bitmap-font test case
with the ps, pdf, and svg backends.
Since the last time these makefiles were last updated some new source
files have been added and one renamed. In addition, a "clean" rule
needed to be added to the pixman makefile. And the "clean" rule in the
main cairo makefile wasn't working properly for me.
The reference count of cairo_font_face_t is rather intimately tied,
(for toy font faces), with the cairo_font_face_hash_table, so we
expand the existing cairo_toy_font_face_hash_table_mutex to cover
the manipulation of font_face->ref_count as well.
This commit eliminates an assertion failure that is (occasionally)
exposed by the pthread-show-text test case:
lt-pthread-show-text: cairo-hash.c:196: _cairo_hash_table_destroy: Assertion `hash_table->live_entries == 0' failed.
Previously we just had an integer counter here, but that is not
sufficient as multiple cairo_scaled_font_t objects, (which are
implicitly shared through the font caches), can reference the
same cairo_ft_unscaled_font_t so real locking is needed here.
This commit eliminates an assertion failure exposed by the
pthread-show-text test case:
lt-pthread-show-text: cairo-ft-font.c:562: _cairo_ft_unscaled_font_unlock_face: Assertion `unscaled->lock > 0' failed.
We're planning to change the implementation of the public function,
(which will remove some locking safety), so use the safe, locked
_cairo_ft_unscaled_font_lock_face for internal use instead.
Don't use structure intitialization for assigning
structure values.
Add a new field to cff_charset_t to point to the sids
charset array instead of casting it into the data field.
The function _cairo_pdf_surface_write_fonts is the
original PDF TrueType font embedding function that was
disabled in commit f500cef19f
shortly before Type3 font support was added.
TrueType font embedding was later reintroduced as new code
making this function obsolete.