[SOLVED] How did I make my darktable use the font Ubuntu everywhere?

Please be patient with me, I think I am officially losing it…

I am using macOS. My darktable is built from master and all the dependencies are installed via homebrew.

I remember that when I first installed darktable on macOS it was using a font that I did not like. Then I did something, and I managed to use ubuntu everywhere. (I am almost sure that I did something, but maybe I am just hallucinating).

Now, for a change, I wanted to try out another font, but I do not remember anymore where is it that I set it (or if I did it, for that matter).

The thing is, I cannot find mentions of [Uu]buntu in any of the places where I would expect to:

  • I am using darktable-elegant-gray, which does not use ubuntu
  • There is no mention of ubuntu in my user.css
  • My ~/.config/gtk-3.0 directory is empty, so no overrides there
  • $ gsettings get org.gnome.desktop.interface font-name returns 'Adwaita Sans 11', which is not even installed on my system.

Where or how else can I possibly have set this override? Any help would be appreciated.

Thanks!

I’m not in the near of my Mac (at work, using Linux at home) but found a bit of CSS in my notes that should do it via settings. If not, I can check in detail on Monday.

.dt_plugin_ui,
.dt_bauhaus,
.dt_bauhaus_popup,
combobox,
combobox *,
togglebutton,
togglebutton *,
notebook,
notebook *,
notebook tab,
notebook tab *,
table,
table *,
row,
row *,
frame,
frame *,
alignment,
entry,
entry *,
dialog,
dialog *,
colorswatch,
colorswatch *,
stack,
stack *,
scrollbar,
scrollbar *,
eventbox,
eventbox *,
scale,
scale *,
button,
button *,
treeview,
treeview *,
menu,
menu *,
separator,
eventbox,
eventbox *,
box,
box *
{ font-family: "Ubuntu Light", "Ubuntu", "IPAPGothic";}


.dt_section_label:not(#blending-box),
#blending-box .dt_section_label label,
#blending-box .dt_section_label .dt_bauhaus
{ font-family: "Ubuntu Medium", "Ubuntu", "IPAPGothic"; }

#iop-panel-label,
#lib-panel-label
{ font-family: "Ubuntu Condensed", "Ubuntu", "IPAPGothic"; }

.active_menu_item *, /* needed for some Pango issues not rendering synthetic bold for all OS */
notebook tabs,
tooltip label,
#blending-tabs,
#modules-tabs
{ font-family: "Ubuntu", "IPAPGothic"; }
1 Like

Thanks, @ralf_s , this is very useful to set all fonts in the UI.

However, I still do not understand why my darktable is using Ubuntu. There must be a general override specified somewhere but i cannot find it.

@Masterpiga I obviously misinterpreted your problem and don’t know where the default font is set. But if your goal is to try another font, could you not just do this by changing the font names in the CSS code?

Yes, I will do that if I cannot find the source of the override.

But there must be a place where “ubuntu” is configured as the overall font, since something is taking precedence over whatever is specified in the CSS.

Did you follow the chain of @import directives in the theme .css files?

2 Likes

Thanks, yes, I was silly :slight_smile:

elegant-grey inherits from elegant-dark, which inherits from elegant-darker. Here, there are a bunch of font overrides with a similar font list:

#iop-panel-label,
#lib-panel-label
{
  font-family: "Roboto Condensed", "Roboto",
               "Segoe UI Condensed", "Segoe UI",
               "SF Pro Display", "SF Pro Display",
               "Ubuntu Condensed", "Ubuntu", "IPAPGothic",
               "Cantarell",
               "Arial Unicode MS",
                sans-serif;
}

As it happens, of all the listed fonts Ubuntu is the first one that I have on my system.

I thought that it was not coming from there because I was looking in the wrong places (i.e., darktable.css and darktable-elegant-grey.css) and I had overlooked the intermediate steps.

So, probably the only thing that I did to make the whole UI use Ubuntu was to install the font on my system. All those CSS stanzas that before were selecting “Arial Unicode MS” suddenly started short-circuiting to Ubuntu.

3 Likes

I was gonna suggest that maybe you had set GTK font overrides but the solution is more obvious :smiley:

1 Like