Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Underscores missing with certain fonts, such as the default "Monospace Regular" font #2386

Closed
blurrred opened this issue Oct 29, 2019 · 13 comments
Labels
duplicate This has already been reported invalid

Comments

@blurrred
Copy link

blurrred commented Oct 29, 2019

-Most other fonts render underscores appropriately
-Changing font size/zoom will cause underscores to appear depending on the setting, even with Monospace Regular font

Geany version: 1.36-1
Using GTK+ v3.24.12 and GLib v2.62.2 runtime libraries.

Using the latest version of Manjaro Linux XFCE.

@elextr
Copy link
Member

elextr commented Oct 29, 2019

Duplicate of #2353 #2287 #1387

@elextr elextr closed this as completed Oct 29, 2019
@elextr elextr added duplicate This has already been reported invalid labels Oct 29, 2019
@bencaradocdavies
Copy link

(Copied from #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 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.

@mqu
Copy link

mqu commented May 4, 2020

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

then restart geany.

@elextr
Copy link
Member

elextr commented May 4, 2020

@mqu thanks.

Of course since the problem is specific to the font its also possible to just select a different font in the GUI.

@dregad
Copy link

dregad commented Feb 10, 2021

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 ?

@elextr
Copy link
Member

elextr commented Feb 10, 2021

@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 or dim underscores 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.

@bencaradocdavies
Copy link

bencaradocdavies commented Feb 11, 2021

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 for the same font. Extra vertical space is not bad because it can improve legibility. Consistent vertical spacing is good because it makes it easier to, for example, compare xfce4-terminal and Geany windows side by side.

@elextr
Copy link
Member

elextr commented Feb 11, 2021

@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.

@dregad
Copy link

dregad commented Feb 11, 2021

@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.

@elextr
Copy link
Member

elextr commented Feb 11, 2021

@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.

@jvollme
Copy link

jvollme commented Mar 19, 2021

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...

@elextr
Copy link
Member

elextr commented Mar 20, 2021

@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).

@bencaradocdavies
Copy link

bencaradocdavies commented Mar 20, 2021

@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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This has already been reported invalid
Projects
None yet
Development

No branches or pull requests

6 participants