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]: https://gitlab.freedesktop.org/fontconfig/fontconfig/-/blob/be453bd1590b545d490aa024ef267948419b4d3a/fonts.conf.in#L33-67

Signed-off-by: Alyssa Ross <hi@alyssa.is>
This commit is contained in:
Alyssa Ross
2021-11-17 17:25:17 +00:00
committed by Marius Vlad
parent 6e2eb8fa94
commit 7c12182576
8 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -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);
+2 -2
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);