-Most other fonts render underscores appropriately -Changing font size/zoom will cause fonts to appear depending on the setting, even with Monospace Regular font
Duplicate of #2353 #2287 #1387
Closed #2386.
(Copied from https://github.com/geany/geany/issues/2466)
I just got the `line_height` workaround to work with excellent results. The `line_height` setting can be found in "Tools" > "Configuration Files" > "filetypes.common". To change this setting from its default `line_height=0;0;` there are two things to note:
* `#~` lines are commented and have no effect. * The file format is an [INI file](https://en.wikipedia.org/wiki/INI_file) so uncommenting the `line_height` line is insufficient because the `[styling]` section is also required; either uncomment this line or add a new `[styling]` section at the end.
The only uncommented lines in my filetypes.common are now:
``` [styling] line_height=0;2; ```
With this setting and DejaVu Sans Mono Book size 12, underscores are visible. Using `line_height=0;1;` also works, but `line_height=0;2;` gives me, for the first time ever, exact agreement (as far as I can tell) with the line height in xfce4-terminal.
a very quick way to fix this issue in Geany :
` cat > $HOME/.config/geany/filedefs/filetypes.common << EOF [styling]
# geany / ubuntu focal / underscore not visible with monospace font # https://github.com/geany/geany/issues/2386
line_height=0;2;
EOF `
@mqu thanks.
Of course since the problem is specific to the font its also possible to just select a different font in the GUI.
Posting to a closed issue, as I don't want to open yet another issue for this.
My setup: geany 1.36 (built on Mar 22 2020 with GTK 3.24.14, GLib 2.64.1) on Ubuntu 20.04.2
I can confirm the problem, not only with Default Monospace font (set to DejaVuSansMono.ttf), but also with quite a few other fixed-type fonts on my system.
Considering the number of people being affected by this (myself included), would you guys consider changing the default `line_height=0;2;` so there is no need for users to fiddle with config files ?
@dregrad, We don't collect statistics about the number of Geany installs, but Github stats show about 10 clones _per day_ but that doesn't count the number of installs from distro repositories. So we can't compare the number of people who have problems with the number who use Geany. But the number who report problems is I think less than 10 and therefore only likely to be a small proportion of users.
Increasing the default line height setting adds useless spacing between lines for everyone, and that reduces the number of lines, for example for me line spacing of `0;2` reduces the number of lines on screen from 81 to 71, a significant difference thats not necessary here since I'm using a different font where underscores are always visible.
Also `0;2` isn't necessary in all cases, its something that worked for someone who posted it, in many cases `0;1` works, it does here if I change my font to Deja-Vu Sans Mono and `0;0` does not work, but as I said above `0;0` works for my normal Hack font [Unpaid advertisement: Hack is a font designed for code and provides great readability for that].
To summarise if we changed the default setting:
Setting | Who | Result | Fix ----------|--------|----------|----- `0;0` | Majority | Works | None needed `0;0` | Minority | No underscores at some font sizes | Change font or font size or edit `filetypes.common` `0;1` | Majority | Lose lines | Edit `filetypes.common` to get lines back `0;1` | Some of the Minority | Works | None needed `0;1` | Rest of the minority | No or dim underscores | Change font or font size or edit `filetypes.common` `0;2` | Almost everybody | Lose even more lines | The majority for whom less than `0;2` works edit `filetypes.common` to get lines back `0;2` | Very unlucky few | No or dim underscores | Change font or font size or Edit `filetypes.common`
It seems to me that says the current situation works best for the greatest number of users and the default setting should not change.
Perhaps the Ubuntu package should set `0;1` if the distro continues to default to a faulty font so it works for almost all and doesn't impact too negatively on many. @dregad you could ask there.
As an aside, I also switched to (a slashed-zero variant of) Hack but stuck with ``` [styling] line_height=1;1; ``` in Geany because it gives me vertical spacing consistent with that in `xfce4-terminal` with the same font.
@bencaradocdavies so long as you put that in your user `filetypes.common` it will continue to override the default set in Geany so it doesn't matter what the default changes to.
@elextr thanks for taking the time to write such a detailed reply - I was not expecting that much. I understand your position and I'm fine with it, considering that there are 2 simple workarounds (switch to a different font or change filetypes.common settings).
That said, for argument's sake, regardless of stats I would say that the number of people complaining is not equivalent to the actual number of affected ones. My point is that I'm running a fairly standard Ubuntu LTS setup which is arguably one of the most popular Linux distros out there, so your _Very unlucky few_ estimate is possibly quite larger than you seem to believe, even if only a dozen people have actually come here to tell you about it.
But anyway, this is your software and I respect your decision; I agree that the fix may be better applied in the Ubuntu package, but to be honest it's not worth my while to pursue this; I will use the workaround.
Thanks for Geany and your support.
@dregad to put your mind at ease, as far as I know the _very unlucky few_ where `0;2` does not work is entirely theoretical based on my understanding of the problem/solution. Nobody has actually said `0;2` doesn't work, but theoretically on an 8k screen maybe 2 teeny pixels might not be enough.
Obviously i am one of the "very unlucky few" because the problem persisted in most fonts(including the above recommended "Deja-Vu Sans Mono Book"), with all of the recommended ```line_height``` settings (including "=1;1"). For me it only seems to work with serif fonts for some reason?
BTW, I do not have high resolution settings or fancy 4k/8k monitors, Just a totally standard setup with the most recent Ubuntu-distro...
@jvollme please paste your filetypes.common where you set `line_height` to a gist and paste a link here (don't paste it directly in this issue).
@jvollme please check that you have an uncommented ```[styling]``` line in your filetypes.common, without which `line_height` will be in the wrong section and have no effect. This section header is commented out by default. For example, I have these lines in my filetypes.common: ```[styling] line_height=1;1;```
github-comments@lists.geany.org