Using glyph indices with Type 1 fonts on a printer DC does not work.
Previously there was a temporary fix where Type 1 fonts were printed
as filled paths.
Now that _cairo_scaled_font_subsets_map_glyph() provides the reverse
mapping of the glyph index fix this by converting the glyph indices
back to the unicode values when printing Type 1 fonts.
Prevously all show_text_glyphs() clusters were using ActualText. This
fixes that.
I have a feeling that the following scenario is broken still though:
- show_text_glyphs maps glyph 1 to some utf8 text different from
what index_to_ucs4 will give for glyph 1. This will assign the
utf8 text to glyph 1's ToUnicode.
- show_glyphs shows glyph 1. Since cluster has no utf8 text, we
won't use ActualText and fall back to ToUnicode. But the ToUnicode
value assigned to glyph 1 is non-standard now. We should use
ActualText.
I have not verified this hypothesis though.
And update user-font text_to_glyphs() method to match.
Currently disable the win32-font text_to_glyphs(), until that one
is updated. Or better yet, remove it and implement ucs4_to_index().
It's the toy font API afterall.
The init func does not actually need to draw anything, but having a cairo_t
similar to that passed to render_glyph is handy for computing font extents.
This is because cairo makes doing some things really hard (if not impossible)
without a cairo_t.
The user-font-proxy test case is a great example of how the added cairo_t
makes life much easier.
When popping a group, transform it by the ctm centered at the origin
specified by the device_transform so that it ends up in the right place
when we try to paint. This fixes the regressions caused by
1a9809baab as shown by the pdf backend.
Adding warn_unused_result to pixman detected a couple of instances where
we abused the knowledge that the code currently can not fail, but in
deference to its independent existence we should be more cautious.
Keep the reference count as zero for temporary, on-stack patterns in
order to detect attempts to keep references beyond their scope. (And
mismatched _init()/_destroy()).
No idea if Ubuntu will ever learn not to modify public API of
common libraries without any clue of what kind of problems they
create by doing that. They could very well define
FC_UBUNTU_LCD_FILTER if they wanted to, but no, they defined
FC_LCD_FILTER as if it's an upstream thing. It wasn't.