ddnexus / equilux-theme

A Material Design-like theme for GNOME/GTK+ based desktop environments.
GNU General Public License v2.0
324 stars 18 forks source link

Prefer Ubuntu regular fonts over Roboto #11

Closed tprasadtp closed 6 years ago

tprasadtp commented 6 years ago

If Roboto fonts are installed, they are used in gnome-shell theme instead of Ubuntu. I assumed that from the screenshots Ubuntu is preferred (?), things look more consistent with Ubuntu Regular fonts.

ddnexus commented 6 years ago

Hey, thanks for the pull request. Indeed the Ubuntu family is preferred... by me at least :).

The fact that I put it after the Roboto family, is because I thought that Roboto is a non standard font on all the distributions, and I thought that if a user got it installed, it's because s/he may prefer it over the Ubuntu family.

Besides the Roboto is the one that is the Material (and Materia Theme) original choice, so putting Ubuntu after Roboto gets the Ubuntu on Ubuntu, and it tries to be not invasive for other possible distributions. I just didn't want to impose Ubuntu on other users just because I like it.

However, the downside of that choice is that if it happens that if you have the Roboto installed, AND you prefer the Ubuntu... well... you are out of luck and your only options are uninstall Roboto or edit the scss.

Now, knowing that, what do you think is the best/polite way to handle it?

I would also like to know what @nana-4 thinks about font priorities...

tprasadtp commented 6 years ago

Hey, thanks for the quick response. What you said is true, If a user prefers Roboto then it will be an issue on most Ubuntu systems, as Ubuntu font family comes pre-installed.

Package texlive-fonts-extra pulls Roboto. I am not aware of any ways to remove Roboto from my system without breaking texlive-fonts-extra. Probable options:

  1. Prefer Ubuntu when Roboto is found
  2. Prefer Roboto when Roboto is found

I am not aware of a way in which we can match window title fonts with shell-theme as its always hardcoded in the theme's CSS.

" it tries to be not invasive for other possible distributions. "

Don't you think that its the other way around? I am not aware of other distros (excluding ubuntu derivatives like mint) pre-installing Ubuntu fonts. So If a user installs Ubuntu, shouldn't it be preferred one?

Now, knowing that what do you think is the best/polite way to handle it?

I think there is no ideal choice as both choices have drawbacks. I would leave the choice to you.

We can, however, create a new variant which uses Roboto and fallbacks to Cantarell if Roboto is not found, and another variant with Ubuntu. Similar to how we can customize colours, we can just change the font, (I think its just a few lines of difference) that should also reduce the overhead of keeping two variants in sync. Unless GNOME provides a way to change shell-theme fonts all implementations will be suboptimal.

What do you think?

ddnexus commented 6 years ago

Not sure the many-variant solution would be easy to handle... Or what about a post-installation script or a manual drop-in replacement for the styles after the installation?

tprasadtp commented 6 years ago

Idea is to use a shell script to change two lines in the original variant and generate scss before compiling them. So that we don't alter css files later. But least complex one would be a post install script as you said. It also reduces dependencies as even a user who has just the css files would also be able to use it without scss and other dependencies.

ddnexus commented 6 years ago

I think that if you can write a simple shell script that edits the installed CSS file... that would be the best solution. You can keep it in a gist or a repo and I can link it from the README, so YOU will maintain it ;).

nana-4 commented 6 years ago

@ddnexus Sorry for the late reply.

I personally think you can put "Ubuntu font" you prefer at the beginning of the property (and remove "M+ 1c",). Because "Ubuntu font" is not installed by default on most distros, except Ubuntu-based distros (as @tprasadtp already mentioned). Also you mention about Ubuntu font in your README, so making it top priority seems reasonable IMO.

By the way, I'm planning that Materia allows users to specify the font family of gnome-shell as an installation option. In the meantime, it's also a good idea to make a post-installation script or just put a command like the following in your README:

sudo sed -i 's/Ubuntu, Roboto/your-preferred-font/g' /usr/share/themes/Equilux{,-compact}/gnome-shell/gnome-shell.css
ddnexus commented 6 years ago

@nana-4 Thank you for your insight, always much appreciated!

About the font priority, I understand what @tprasadtp and you say about putting Ubuntu as preferred over the others, however, changing it now could surprise (and probably not in a good sense) users that have Roboto installed (and like it the way it is).

Besides, being a "Material" inspired theme, the original Roboto font should be respected (even if I personally dislike it). So I think that I would definitely prefer to add a note in the README with your suggested little script. That should get the job done for everybody that prefers Ubuntu over Roboto and have both installed, (like @tprasadtp) and should avoid unwanted surprises to other users. @tprasadtp do you agree?

Hoping that everybody could get what s/he prefers...

nana-4 commented 6 years ago

Happy to help!

I understand what you are thinking. So, I do +1 for adding a note in the README.

Just a little note/suggestion; I suggest that you remove "M+ 1c", or lower it priority. Since M+ 1c font was just added for my personal preference. :D

ddnexus commented 6 years ago

@nana-4 I see :). BTW, while we are talking about fonts... I always forgot to ask you about one "fix" that I had to "fix" :) in order to get the menu separator work in Nautilus. Is that related to the M+ 1c font? https://github.com/ddnexus/equilux-theme/commit/d7d28aad3ea0d514638a947ca45798b018fe85d5 Without it the separators are all over the menu items at least with the Ubuntu font.

nana-4 commented 6 years ago

@ddnexus Sorry but I don't understand what you're saying. It is intended to fix/tweak the irregular spaces of the popover.

patched VS unpatched: imageimage

Is this related to something of fonts?

ddnexus commented 6 years ago

Right now with your patch commented out in Equilux I see practically the same spacing you have on the left (patched), and if I un-comment it (so with original patch in place) the line height is too close and the separators kind of overlap the items.

I don't have my laptop now, so I am sorry I cannot produce a screenshot now (and probably for a couple more days) but I believe it has to be related with the fonts that may have a different natural height. Maybe you can try Materia with Ubuntu, and see if that appear to be too tight.

I hope will be back to this in a couple of days.

tprasadtp commented 6 years ago

@ddnexus I agree!. It will adhere to Material design specs and avoid confusion. @nana-4 Thank you for the insight :)

ddnexus commented 6 years ago

OK, I edited the README and it will be pushed ASAP.

@nana-4: I just reverted my fix of your fix and it looks like it works well now. Great. Sorry or the noise :)

Meanwile... I've always found the separators of the app panel menu particularly ugly. There is soooo much space taken by the separators that the items look like lost in the menu! Don't you think? Could we do anything about that?

panel-app-menu

nana-4 commented 6 years ago

@ddnexus Thanks for the screenshot. Aha, I finally understand what you mean. :)

Well, It's actually gnome-shell (St) menu, not Nautilus (GTK+) menu! (from the perspective of the theme.)

Yes, I completely agree that it is too much space. However, I think it is an upstream (gnome-shell) bug and cannot be fixed by the theme. (I attempted to fix it before, but I couldn't. And I have never seen a gnome-shell theme that removed the ugly space.) Also, I guess this is not much related to fonts.

So, I think this issue should be reported to the upstream gnome-shell. :)

EDIT:

The separator is defined in .popup-separator-menu-item in gnome-shell.css. But even if you edit as follows, the space will hardly change:

.popup-separator-menu-item {
  spacing: 0 !important;
  font-size: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background-color: transparent;
  border-color: rgba(0, 0, 0, 0.12);
  border-bottom-width: 1px;
  border-bottom-style: solid;
}
nana-4 commented 6 years ago

Hi, @ddnexus I looked the updated README, but I think it is necessary to rewrite Ubuntu, Roboto to Roboto, Ubuntu. (I wrote such a command in the previous comment because I assumed that this PR would be accepted. :) )

ddnexus commented 6 years ago

Hi @nana-4, my bad, sorry. I just copied and pasted without even checking the logic of it. I fixed it and improved the description a bit now. Thanks.

ddnexus commented 6 years ago

@nana-4: thanks for the info about the .popup-separator-menu-item. Any idea about why it does not change?

nana-4 commented 6 years ago

@ddnexus I have no idea, sorry.

By the way, it seems this bug has already been reported to the upstream. (Unfortunately there seems to be no progress in particular.)

ddnexus commented 6 years ago

@nana-4 Oh well... it looks like it is quite old and nobody is doing anything about it. :/ They should put YOU in charge of the whole UI! I am serious: the worse part of linux is the UI, and that is particularly irritating for me or anybody coming from years in the graphic fields and used to notice (and be very sensitive) to all the little details around it.

Well... I guess in a few more years it might get fixed :/

Anyway, thanks for your time and fine work: it makes many people feel a lot better with the linux UI.

nana-4 commented 6 years ago

@ddnexus Well, I'm not really a UI expert, but I appreciate your compliment. :)

You too, keep up the good work and make people happy. :)