With things like meta-surface, the assumption that coordinates are always
non-negative make no sense. Extend the "infinite" extents accordingly.
Also remove stale comment. extents->width/height are unsigned these days and
cover the full range.
Previously the paginated constructor didn't reference the target surface, but
simply assume ownership of the reference, and then unref it when shutting
down. The callers to paginated constructor then, where just give away their
reference to paginated and not unref the reference they were holding. While
this works correctly, it's against the usual idioms that everyone is
responsible for the reference they are holding, and should get their own
reference if they need to keep an object alive. Fix it all.
We have tested the case of device transforms that have both translate and
scale. So it basically works. We just are not sure that we handle it in
all places (In fact we know we don't.)
For every glyph evicted from the cache we would allocate a very small
structure to push onto the xlib work queue. This quickly becomes
noticably for an app that consumes a lot of scaled fonts and glyphs,
e.g. trying to draw text at various angles. So we maintain a small array
of glyphs pending finalisation and issue the XRenderFreeGlyphs() once the
array is full.
During the destruction of every font used with an xlib surface, we send
an XRenderFreeGlyphs() for every single glyph in the cache. These
requests are redundant as the server-side glyphs will be released along
with the XRenderFreeGlyphSet(), so we skip the individual glyph
destruction if the font is marked as finished.
XRender performs a round-trip in order to query the available formats on
the xserver, before searching for a matching format. In order to save
that round-trip and to avoid the short-lived allocation of the array of
available formats, we cache the result on the display.
The current solid surface cache returns an existing similar surface only
if it is an exact match for the desired colour. This gives a high hit
rate for the original goal of drawing text, but fails when using a lot
of colours - for example drawing a pie-chart, the mosaic perf case, or
browsing the web. So instead of creating a new surface from scratch we
can repaint an existing one, providing that we have sufficient surfaces
already cached, i.e. if we are going to evict a surface, we may as well
just repaint it.
test/invalid-matrix purposely feeds invalid numbers into cairo, in
order to check its detection of garbage values. In doing so, cairo
raises an Invalid exception, but as this is a direct result of an abuse
of the API we can treat it as expected behaviour and ignore the
exception.
Some platforms and applications enable floating point exceptions, so it
seems sensible to run the test-suite with the most serious exceptions
enabled - divide by zero, invalid result and overflow.
Use cairo_win32_scaled_font_select_font() instead of
_cairo_win32_scaled_font_select_unscaled_font() to select the font.
Because _cairo_win32_scaled_font_select_unscaled_font() displays a
warning when used with a bitmap font.
The glyph width caculation was not compensating for the
WIN32_FONT_LOGICAL_SCALE resulting in a glyph width and glyph advance
32 times larger than it should be.
158d24412b fixed win32 printing of bitmap fonts by forcing the use
of fallback images. This exposed a bug in the win32 bitmap font
metrics when a device scale is used that resulted in clipped glyphs.
The win32 printing surface has the same problem with bitmap fonts as
it does with Type 1 fonts. ie ExtTextOutW() with glyph indices works
for a display DC but not a printer DC.
Fix this by forcing fallback for bitmap fonts.
Franz Schmid reported on the mailing list,
http://lists.cairographics.org/archives/cairo/2008-April/013912.html,
an issue with drawing a dashed rubber band in Scribus. The problem
appears when segments of the dashed rectangle are outside the image,
with the errant dash connecting the ends of the visible segments.
We do not want to enforce the gtk-doc markup in the preformated
examples, so run the files through sed to filter out <programlisting>
before checking with the error detecting regexp.
Extend the documentation for cairo_ft_font_face_create_for_ft_face() to
demonstrate using cairo_font_face_set_user_data() to destroy the FT_Face
after the final reference to the cairo_font_face_t has been dropped.