1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-05-09 21:52:10 -05:00
Ben Harris 429478f914 GTK: less-fuzzy bitmap font scaling with Cairo
This commit fixes a problem that Simon observed when using an X bitmap
font with Cairo and making a line double-width or double-size.  When
using Cairo, PuTTY implements double-width and double-size by just
asking Cairo to scale all its drawing operations.  This works fine
with outline fonts, but when using a bitmap font the results are a bit
fuzzy.  This appears to be because Cairo's default is to use bilinear
interpolation when scaling an image, which is fine for photos but not
so good for fonts.

In this commit, I decompose PuTTY's cairo_mask_surface() call into its
component parts so that I can set the mask pattern's filter to
CAIRO_FILTER_NEAREST before using it.  That solves the problem, but it
suggests that maybe we should be caching the pattern rather then the
surface.
2025-04-23 19:53:36 +01:00
..
2022-05-05 19:04:34 +01:00
2023-12-18 14:47:48 +00:00