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

Font rendering is slightly harder to read #1066

Open
thdoan opened this issue Jun 10, 2016 · 10 comments
Open

Font rendering is slightly harder to read #1066

thdoan opened this issue Jun 10, 2016 · 10 comments

Comments

@thdoan
Copy link

thdoan commented Jun 10, 2016

After using Geany for almost a day using the Solarized Dark theme, I felt that the text in Geany was slightly harder to read than in Notepad++, an editor I've been using for the past couple years. At first I thought I was imagining things, but after taking screenshots from each editor and comparing them side-by-side with a magnifying glass, I finally figured out why: the font rendering in Geany is ever so slightly darker (or thinner?) than the font rendering in other code editors like Notepad++. Here is the comparison (click to view it at 100%):

image

Notepad++ is on top and Geany is on the bottom. It is barely noticeable in the image above, but if you zoom in and use the eyedropper tool you will find that the colors in Geany are darker than the ones in Notepad++:

image

Maybe I'm just more sensitive to this than others, but after spending a day editing code containing lots of strings using the Solarized Dark theme, I find that the code in Geany is slightly harder to read.

I'm not sure how to categorize this because I suspect it is related to the native font rendering engine that is used in Geany.

@elextr
Copy link
Member

elextr commented Jun 10, 2016

Indeed it is likely to be a difference between rendering engines, Geany uses the GTK rendering engine, but IIUC Notepad uses windows native rendering.

All you can do is tweak the theme values to suit yourself.

@codebrainz
Copy link
Member

It's definitively the rendering, Scintilla's Pango/Cairo rendering looks kind of rough on all platforms compared native Win32, or Qt or even real GTK+ font rendering like GtkSourceView-based apps. It's particularly bad on Windows though.

@thdoan You could try to copy the solarized-dark.conf file and make all the styles bold, it might give you better results. I have several themes where I've made "all bold" and "no bold" variants, which I use depending on the font and size to get adequate looking fonts.

IMO this bug report could made valid by changing the title to "Font rendering sucks." :)

@thdoan
Copy link
Author

thdoan commented Jun 10, 2016

@codebrainz Would it be a big undertaking to adopt a different rendering engine?

@codebrainz
Copy link
Member

@thdoan yes, for a separate rendering engine. It would probably be less difficult to change Scintilla to mimic closer GTK+'s normal font rendering (ex. matching hinting, aliasing, widths, etc). For a comparison between Scintilla and GTK+'s normal font rendering, assuming you're not using "native" win32 dialogs, open the Font Chooser (View->Change Font) and compare the font shown in the "Preview" part of the font chooser dialog to what you see in Geany.

@elextr
Copy link
Member

elextr commented Jun 10, 2016

Scintilla doesn't put any effort into GTK on windows because it also
provides a native windows version. But IIUC it would be a lot of work to
change Geany to use that, and its only on windows, so there would be a big
increase in support work as there would now be two versions of Geany.

On 10 June 2016 at 14:10, Matthew Brush notifications@github.com wrote:

@thdoan https://github.com/thdoan yes, for a separate rendering engine.
It would probably be less difficult to change Scintilla to mimic closer
GTK+'s normal font rendering (ex. matching hinting, aliasing, widths, etc).
For a comparison between Scintilla and GTK+'s normal font rendering,
assuming you're not using "native" win32 dialogs, open the Font Chooser
(View->Change Font) and compare the font shown in the "Preview" part of the
font chooser dialog to what you see in Geany.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#1066 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AAxgTe0BnYxQmXqCtfXKlJrM8rLq2JVyks5qKOOigaJpZM4IymIF
.

@thdoan
Copy link
Author

thdoan commented Jun 10, 2016

Thanks for the explanation guys 👍

@b4n
Copy link
Member

b4n commented Jun 10, 2016

@codebrainz Here the screenshots are very slightly different, I don't think you can say "one sucks" and the other not :) And apparently the font rendering quality in Geany also depends on the font (and maybe some system settings?), as I never noticed a problem with the font I use (my desktop's default) and all my efforts to see whether it was worse than other apps failed to do so. So I guess, YMMV.

But kind of a stupid question: have you checked the themes really use the same color? I mean, they are separate themes, Geany's just happen to try and mimic another one; what if the color just wasn't exactly the same?

@thdoan
Copy link
Author

thdoan commented Jun 10, 2016

@b4n Yup, both editors are using the following colors with Consolas 10pt font:

base03=#002b36
base02=#073642
base01=#586e75
base00=#657b83
base0=#839496
base1=#93a1a1
base2=#eee8d5
base3=#fdf6e3
yellow=#b58900
orange=#cb4b16
red=#dc322f
magenta=#d33682
violet=#6c71c4
blue=#268bd2
cyan=#2aa198
green=#859900

When I get a chance I will try turning up the luminosity in Geany to see if it makes a difference.

@elextr
Copy link
Member

elextr commented Jun 10, 2016

It could also depend on how the different rendering engines map 24 bit colours to whatever colour depth your GPU uses.

@lee321987
Copy link

lee321987 commented May 21, 2024

Just wanted to say I switched my font from "DejaVu Sans Mono" to "Cascadia Mono NF", and this problem was alleviated a significant amount for me.
("Cascadia Mono Nerd Font" is a subset of the "Cascadia Code" font)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants