From 9b32e2c0496aa5ff5d109bb0ec4a90b9eec0a521 Mon Sep 17 00:00:00 2001 From: Alice Mikhaylenko Date: Fri, 31 Jan 2025 19:48:59 +0400 Subject: [PATCH] Use the new default fonts in docs --- HACKING.md | 7 ++++++- doc/css-variables.md | 8 ++++---- src/adw-style-manager.c | 8 ++++---- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/HACKING.md b/HACKING.md index 89be48fcf..c0af3615b 100644 --- a/HACKING.md +++ b/HACKING.md @@ -642,9 +642,14 @@ to [`doc/libadwaita.toml.in`](./doc/libadwaita.toml.in). #### Regenerating Screenshots -Make sure your system has Cantarell and Noto Sans Mono fonts installed on your +Make sure your system has Adwaita Sans and Adwaita Mono fonts installed on your system, otherwise the screenshots may have wrong fonts. +Make sure your system document and monospace fonts are set to: + +- `org.gnome.desktop.interface` `document-font-name`: `Adwaita Sans 11` +- `org.gnome.desktop.interface` `monospace-font-name`: `Adwaita Mono 11` + To regenerate all screenshots, run: ```c diff --git a/doc/css-variables.md b/doc/css-variables.md index bb1c58d71..54ced9d7b 100644 --- a/doc/css-variables.md +++ b/doc/css-variables.md @@ -995,8 +995,8 @@ Document font should be used in articles, messages and other content. Name | Example Value -------------------------------- | ------------- ---document-font-family | Sans ---document-font-size | 10pt +--document-font-family | Adwaita Sans +--document-font-size | 11pt ## Monospace Font @@ -1007,8 +1007,8 @@ style class. Name | Example Value -------------------------------- | ------------- ---monospace-font-family | Monospace ---monospace-font-size | 10pt +--monospace-font-family | Adwaita Mono +--monospace-font-size | 11pt # Helpers diff --git a/src/adw-style-manager.c b/src/adw-style-manager.c index 3038460f1..53c287237 100644 --- a/src/adw-style-manager.c +++ b/src/adw-style-manager.c @@ -785,7 +785,7 @@ adw_style_manager_class_init (AdwStyleManagerClass *klass) * The system document font. * * The font is in the same format as [property@Gtk.Settings:gtk-font-name], - * e.g. "Sans 10". + * e.g. "Adwaita Sans 11". * * Since: 1.7 */ @@ -800,7 +800,7 @@ adw_style_manager_class_init (AdwStyleManagerClass *klass) * The system monospace font. * * The font is in the same format as [property@Gtk.Settings:gtk-font-name], - * e.g. "Monospace 10". + * e.g. "Adwaita Mono 11". * * Since: 1.7 */ @@ -1135,7 +1135,7 @@ adw_style_manager_get_accent_color_rgba (AdwStyleManager *self) * Gets the system document font. * * The font is in the same format as [property@Gtk.Settings:gtk-font-name], - * e.g. "Sans 10". + * e.g. "Adwaita Sans 11". * * Returns: the system document font * @@ -1159,7 +1159,7 @@ adw_style_manager_get_document_font_name (AdwStyleManager *self) * Gets the system monospace font. * * The font is in the same format as [property@Gtk.Settings:gtk-font-name], - * e.g. "Monospace 10". + * e.g. "Adwaita Mono 11". * * Returns: the system monospace font * -- GitLab