freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft-devel] freetype-py + pycairo/cairocffi examples (Re: [cairo] FT_Bitm


From: Hin-Tak Leung
Subject: [ft-devel] freetype-py + pycairo/cairocffi examples (Re: [cairo] FT_Bitmap_Convert, and FreeType's bitmap format vs Cairo's)
Date: Wed, 26 Apr 2017 21:12:50 +0000 (UTC)

--------------------------------------------
On Tue, 25/4/17, Bill Spitzak <address@hidden> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]