[cairo] How can I activate subpixel positioning for text with `pangocairo` and `(py)cairo`?
Uli Schlachter
psychon at znc.in
Thu May 7 13:43:31 UTC 2020
On 07.05.20 13:10, Sebastian M. Ernst wrote:
> - Which version / release of cairo & pycairo do I need for activating
> this feature? Or do I (still) need to build cairo & pycairo from
> (unreleased) master?
Random guess: This is related to src/cairo-ft-font.c, so I took a quick
look at the output of "git log src/cairo-ft-font.c". The third entry
sounds like what you are looking for:
commit ea9329215d3431ded51a71b724baf0edc25ad633
Author: Matthias Clasen <mclasen at redhat.com>
Date: Sat Jul 28 12:25:47 2018 +0000
image compositor: Support subpixel positioning
Support subpixel positioning with a 4x4 subpixel grid.
When compositing glyphs in the image compositor,
we store the subpixel phases in the high bits of the
glyph index. The _cairo_scaled_glyph_index() macro
has been updated to discard these bits. By storing
the phases in the glyph index, the glyph cache just
keeps working. When loading a glyph, the Freetype
font backend shifts the outline according to the
phases.
So, what is the first release that contains this commit?
$ git describe --contains ea9329215d3431ded51a71b724baf0edc25ad633
fatal: cannot describe 'ea9329215d3431ded51a71b724baf0edc25ad633'
Hm, doesn't seem to be in any release.
Cheers,
Uli
P.S.: Why do you need this feature anyway? My fonts look fine to me
without it, I think...
--
Bitte nicht mit dem verbleibenden Auge in den Laser gucken.
- Vincent Ebert
More information about the cairo
mailing list