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.
The GL support in Cairo has always been a prototype, and
nothing happened in the past 10+ years to make it work as
it was meant to.
GL support is not enabled by any downstream packagers of
Cairo, so nobody should notice its absence.
The index id is expected to be "api-index-*" not just "index-*", and for
some reason newer versions of gtk-doc don’t like these "role" attributes
and will not generate the index if they are present. Also add missing
indices for 1.0 and 1.18.
The previous approach using foreground colors in user fonts does not
work for gradients since the foreground color is not available at the
time of recording.
Add a new function cairo_user_scaled_font_get_foreground_source() that
can be called by the color render function to retrieve the foreground
pattern. Calling this function signals to cairo that the foreground
color is used. In this case cairo will call the render function
whenever the foreground color has changed.
The surface code was optimizing away show_text_glyphs
based on the operator when the source pattern is clear.
But if we are rendering color glyphs, that is not
correct since we are using the glyphs as source.
This removes the following output:
Generating src/cairo.def
<stdin>:6:9: warning: #pragma once in main file
<stdin>:4377:9: warning: #pragma once in main file