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);
static BLocker movement_locker;
+/* This could be a private API, but it's used by (at least) the Qt
+ port, so it's probably here to stay. */
+extern status_t get_subpixel_antialiasing (bool *);
+
extern "C"
{
extern _Noreturn void emacs_abort (void);
BWindow *w = (BWindow *) window;
return w->IsActive ();
}
+
+bool
+be_use_subpixel_antialiasing (void)
+{
+ bool current_subpixel_antialiasing;
+
+ if (get_subpixel_antialiasing (¤t_subpixel_antialiasing) != B_OK)
+ return false;
+
+ return current_subpixel_antialiasing;
+}
extern bool
BWindow_is_active (void *window);
+ extern bool
+ be_use_subpixel_antialiasing (void);
+
#ifdef __cplusplus
extern void *
find_appropriate_view_for_draw (void *vw);