clients: don't use deprecated fontconfig aliases

The "sans" and "mono" aliases for "sans-serif" and "monospace" are
deprecated[1].  Let's standardize on the non-deprecated versions, which were
already in use in some places.

[1]: be453bd159/fonts.conf.in (L33-67)

Signed-off-by: Alyssa Ross <hi@alyssa.is>
dev
Alyssa Ross 3 years ago committed by Marius Vlad
parent 6e2eb8fa94
commit 7c12182576
  1. 2
      clients/cliptest.c
  2. 4
      clients/content_protection.c
  3. 2
      clients/fullscreen.c
  4. 2
      clients/keyboard.c
  5. 2
      clients/stacking.c
  6. 2
      clients/terminal.c
  7. 2
      clients/window.c
  8. 4
      shared/cairo-util.c

@ -341,7 +341,7 @@ redraw_handler(struct widget *widget, void *data)
cairo_scale(cr, 4.0, 4.0);
cairo_set_line_width(cr, 0.5);
cairo_set_line_join(cr, CAIRO_LINE_JOIN_BEVEL);
cairo_select_font_face(cr, "Sans", CAIRO_FONT_SLANT_NORMAL,
cairo_select_font_face(cr, "sans-serif", CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size(cr, 5.0);
draw_geometry(cr, &cliptest->view, ex, ey, n);

@ -123,7 +123,7 @@ draw_content(cairo_surface_t *surface, int x, int y, int width, int height,
cairo_fill(cr);
cairo_set_source_rgba(cr, 0, 0, 0, 1.0);
cairo_select_font_face(cr, "Sans", CAIRO_FONT_SLANT_NORMAL,
cairo_select_font_face(cr, "sans-serif", CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size(cr, 15);
if (type == WESTON_PROTECTED_SURFACE_TYPE_HDCP_0)
@ -263,7 +263,7 @@ buttons_redraw_handler(struct widget *widget, void *data)
cairo_fill(cr);
cairo_set_source_rgba(cr, 0, 0, 0, 1.0);
cairo_select_font_face(cr, "Sans", CAIRO_FONT_SLANT_NORMAL,
cairo_select_font_face(cr, "sans-serif", CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size(cr, 10);
cairo_move_to(cr, allocation.x + 5, allocation.y + 15);

@ -80,7 +80,7 @@ draw_string(cairo_t *cr,
cairo_save(cr);
cairo_select_font_face(cr, "sans",
cairo_select_font_face(cr, "sans-serif",
CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size(cr, 14);

@ -377,7 +377,7 @@ redraw_handler(struct widget *widget, void *data)
cairo_rectangle(cr, allocation.x, allocation.y, allocation.width, allocation.height);
cairo_clip(cr);
cairo_select_font_face(cr, "sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_select_font_face(cr, "sans-serif", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size(cr, 16);
cairo_translate(cr, allocation.x, allocation.y);

@ -200,7 +200,7 @@ draw_string(cairo_t *cr,
cairo_save(cr);
cairo_select_font_face(cr, "sans",
cairo_select_font_face(cr, "sans-serif",
CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size(cr, 14);

@ -3143,7 +3143,7 @@ int main(int argc, char *argv[])
config_file = weston_config_get_name_from_env();
config = weston_config_parse(config_file);
s = weston_config_get_section(config, "terminal", NULL, NULL);
weston_config_section_get_string(s, "font", &option_font, "mono");
weston_config_section_get_string(s, "font", &option_font, "monospace");
weston_config_section_get_int(s, "font-size", &option_font_size, 14);
weston_config_section_get_string(s, "term", &option_term, "xterm");
weston_config_destroy(config);

@ -5424,7 +5424,7 @@ menu_redraw_handler(struct widget *widget, void *data)
cairo_rectangle(cr, x, y, width, height);
cairo_fill(cr);
cairo_select_font_face(cr, "sans",
cairo_select_font_face(cr, "sans-serif",
CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size(cr, 12);

@ -494,7 +494,7 @@ create_layout(cairo_t *cr, const char *title)
layout = pango_cairo_create_layout(cr);
if (title) {
pango_layout_set_text(layout, title, -1);
desc = pango_font_description_from_string("Sans Bold 10");
desc = pango_font_description_from_string("sans-serif Bold 10");
pango_layout_set_font_description(layout, desc);
pango_font_description_free(desc);
}
@ -577,7 +577,7 @@ theme_render_frame(struct theme *t,
cairo_text_extents_t extents;
cairo_font_extents_t font_extents;
cairo_select_font_face(cr, "sans",
cairo_select_font_face(cr, "sans-serif",
CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size(cr, 14);

Loading…
Cancel
Save