diff options
author | Po Lu <luangruo@yahoo.com> | 2022-01-05 12:02:32 +0000 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-01-05 12:05:14 +0000 |
commit | ed7c6d687306a69cb31154e9251c6b1d8af62de5 (patch) | |
tree | be4d3f0f5108c92ad62b69b4e9e32445908498c8 /src/ftcrfont.c | |
parent | 83e346b70a47091ecd6eb526935abfd0db6c7cf3 (diff) | |
download | emacs-ed7c6d687306a69cb31154e9251c6b1d8af62de5.tar.gz |
Enable subpixel antialiasing on the Cairo font driver on Haiku
* src/ftcrfont.c (ftcrfont_open): Manually enable subpixel
antialiasing on Haiku.
* src/haiku_support.cc
(get_subpixel_antialiasing): New function declaration.
(be_use_subpixel_antialising):
* src/haiku_support.h (be_use_subpixel_antialising): New
functions.
Diffstat (limited to 'src/ftcrfont.c')
-rw-r--r-- | src/ftcrfont.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ftcrfont.c b/src/ftcrfont.c index 337e804b895..558e44d5b91 100644 --- a/src/ftcrfont.c +++ b/src/ftcrfont.c @@ -169,6 +169,10 @@ ftcrfont_open (struct frame *f, Lisp_Object entity, int pixel_size) cairo_matrix_init_scale (&font_matrix, pixel_size, pixel_size); cairo_matrix_init_identity (&ctm); cairo_font_options_t *options = cairo_font_options_create (); +#ifdef USE_BE_CAIRO + if (be_use_subpixel_antialiasing ()) + cairo_font_options_set_antialias (options, CAIRO_ANTIALIAS_SUBPIXEL); +#endif cairo_scaled_font_t *scaled_font = cairo_scaled_font_create (font_face, &font_matrix, &ctm, options); cairo_font_face_destroy (font_face); |