Applying a transformation matrix to a glyph path after converting
floats to fixed point numbers caused caluculation errors. Apply the
transform before the conversion.
Fixescairo/cairo#611
The code is doing "if (!double_buf_equal () != 0)" which seems to be a
convoluted way to do "if (!double_buf_equal ())". Fixes:
../test/pattern-getters.c:153:6: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
if (!double_buf_equal (ctx, new_buf, expected_values,
^
../test/pattern-getters.c:153:6: note: add parentheses after the '!' to evaluate the comparison first
if (!double_buf_equal (ctx, new_buf, expected_values,
^
(
../test/pattern-getters.c:153:6: note: add parentheses around left hand side expression to silence this warning
if (!double_buf_equal (ctx, new_buf, expected_values,
^
(
../perf/cairo-perf-chart.c:232:4: warning: variable 'sum' is uninitialized when used here [-Wuninitialized]
sum += v/100;
^~~
../perf/cairo-perf-chart.c:142:43: note: initialize the variable 'sum' to silence this warning
double slow_sum = 0, fast_sum = 0, sum;
^
= 0.0
../src/cairo-pdf-surface.c:2505:9: warning: variable 'status' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (surface->base.status != CAIRO_STATUS_SUCCESS)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/cairo-pdf-surface.c:2573:9: note: uninitialized use occurs here
if (status == CAIRO_STATUS_SUCCESS)
^~~~~~
../src/cairo-pdf-surface.c:2505:5: note: remove the 'if' if its condition is always false
if (surface->base.status != CAIRO_STATUS_SUCCESS)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/cairo-pdf-surface.c:2497:5: note: variable 'status' is declared here
cairo_status_t status, status2;
^
../test/cairo-test-runner.c:730:48: warning: parameter 'str' set but not used [-Wunused-but-set-parameter]
_has_required_ghostscript_version (const char *str)
We're using an EOL version of GTK; we know we are using deprecated API.
Until somebody shows up with a replacement, or until we drop the perf
widget, we should avoid unnecessary compiler warnings.
While it's possible to write C code in Python, it's better to actually
write Python code in Python.
Use regular expressions, instead of counting characters, to allow a
little bit more leeway when editing the cairo-version.h header file.
Use a context manager to handle the lifetime of a file object.
Use f-strings instead of the obsolete format() method.
_cairo_win32_gdi_compositor_glyphs was falling back to the default
implementation for DWrite font because check_glyphs() returned FALSE
for CAIRO_FONT_TYPE_DWRITE.
Fixescairo/cairo#597
GetGdiCompatibleMetrics may return a glyph metrics that yields a small
nagative glyph height. But, it was calculated in unsigned integer.
And, it resulted in a very large glyph metrics.
Calculate glyph width and height in signed integer and let them
non-negative.
This implements Type 3 color fonts for PDF for any font with a
CAIRO_SCALED_GLYPH_INFO_RECORDING_SURFACE. This includes user-fonts,
SVG fonts, and COLR fonts.
Glyphs with foreground colors are not yet implemented as Type 3 glyphs
and will be rendered as images by cairo-surface.