freetype-py + pycairo/cairocffi examples (Re: FT_Bitmap_Convert, and FreeType's bitmap format vs Cairo's)

Hin-Tak Leung <[email protected]>
Newsgroups gmane.comp.lib.cairo,gmane.comp.fonts.freetype.devel
Message-ID <[email protected]>
--------------------------------------------
On Tue, 25/4/17, Bill Spitzak <[email protected]> wrote:

> Possibly you want to do
 cairo_patter_set_filter(source,
 CAIRO_FILTER_BEST) or CAIRO_FILTER_NEAREST (the
 difference is that
 BEST will actually
 antialias the boundaries between the pixels which
 looks nicer if the image is rotated or scaled
 by a non-integer).

Thanks for the tips. I have switched from CAIRO_FILTER_NEAREST to CAIRO_FILTER_BEST before I push. The code for the 7 freetype-py + pycairo examples are up at:
https://github.com/rougier/freetype-py/pull/55

All of them should work also with cairocffi, except wordle-cairo.py - it requires region_t, which is only in pycairo 1.11+ (released just over 2 weeks ago), or the older patched py3cairo shipped in Ubuntu/Debian. Fedora's unpatched, and older.

The 7 figures output are:
https://github.com/rougier/freetype-py/issues/45#issuecomment-297070166
https://github.com/rougier/freetype-py/issues/45#issuecomment-297070438
https://github.com/rougier/freetype-py/issues/45#issuecomment-297070741
https://github.com/rougier/freetype-py/issues/45#issuecomment-297071152
https://github.com/rougier/freetype-py/issues/45#issuecomment-297071653
https://github.com/rougier/freetype-py/issues/45#issuecomment-297072023
https://github.com/rougier/freetype-py/issues/45#issuecomment-297532735
-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.