b4n left a comment (geany/geany#4326)
> In addition to this patch, another place where the not-really-good-looking
> Courier New is used is the search entry which is controlled by this in
> geany.css: […]
I don't think it's a particularly good idea to add *Consolas* on non-Windows.
FWIW, I believe that if GTK (or rather, fontconfig) is not picking up the right
monospace font on Windows, it's probably a bug there. In any case, it'd be
weird not to follow the system values for systems where it works, in case that
other font is available there.
If we really want something a different default on Windows for this, I see 2
options:
* Load a platform-specific CSS, if available (and we'd distribute
`geany-windows.css` or something)
* Replace a placeholder with a platform-specific value, <details><summary>e.g.
something like this</summary>
```diff
diff --git a/configure.ac b/configure.ac
index 39fba3498..c50cf6380 100644
--- a/configure.ac
+++ b/configure.ac
@@ -145,6 +145,12 @@ GEANY_CHECK_GTKDOC_HEADER
# libgeany
GEANY_LIB_INIT
+# Monospace font
+AM_COND_IF([MINGW],
+ [MONOSPACE_FONT="Consolas, monospace"],
+ [MONOSPACE_FONT="monospace"])
+AC_SUBST([MONOSPACE_FONT])
+
# Output
AC_CONFIG_FILES([
Makefile
@@ -167,6 +173,7 @@ AC_CONFIG_FILES([
plugins/Makefile
po/Makefile.in
data/Makefile
+ data/geany.css
data/filedefs/filetypes.python
doc/Makefile
doc/geany.1
diff --git a/data/Makefile.am b/data/Makefile.am
index 71e01da15..c372e9edf 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -182,8 +182,8 @@ nobase_dist_pkgdata_DATA = \
filetype_extensions.conf \
snippets.conf \
ui_toolbar.xml \
- geany.glade \
- geany.css
+ geany.glade
nobase_pkgdata_DATA = \
- $(filetypes_nodist)
+ $(filetypes_nodist) \
+ geany.css
diff --git a/data/geany.css b/data/geany.css.in
similarity index 97%
rename from data/geany.css
rename to data/geany.css.in
index e22615bee..5945e3426 100644
--- a/data/geany.css
+++ b/data/geany.css.in
@@ -16,7 +16,7 @@
/* use monospaced font in search entries for easier reading of regexp
(#1907117) */
#GeanyDialogSearch entry {
- font-family: monospace;
+ font-family: @MONOSPACE_FONT@;
}
/* set red background for GtkEntries showing unmatched searches */
```
Beware that I didn't update Meson.
</details>
FWIW, I also realized that GTK3 has `GTK_STYLE_CLASS_MONOSPACE`. It probably
doesn't solve anything, unless the theme picks up a specific font for this.
But maybe we should start using this in the future (or soon, if it happened to
fix this)
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/4326#issuecomment-2957143434
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/4326/[email protected]>