How to change font size for dialogs not just menus?

Hi. This may seem like a familiar question but my issue is different and none of the answers provided in other questions solve my problem.

According to this discussion, Libreoffice only applies system font settings to menus and not dialogs: (unfortunately bug closed now)

It says this doesn’t happen if libreoffice-gtk, libreoffice-gnome or libreoffice-kde are installed.

However, if I install libreoffice-gtk or libreoffice-gnome the dialog fonts are still tiny

“Use system font for user interface” you say? it changes the font but not the size

Use Replacement table you say? it changes the font but not the size (unless there’s a way to also replace the size I don’t know of)

Use font Scaling you say? it works but makes the menus too big as they are already larger. I need both menus and dialogs’ fonts to be the same size, and larger than the defaults.

So what can be done to achieve what I need? Remember I’ve already changed my os settings to make fonts bigger in all apps, and only Libreoffice’s menus are affected by this (e.g. they’re already bigger) I’ve tested on both series 4 and series 5, on both Ubuntu 16 Mate and Linux Mint 17 XFCE

Thank you

The best workaround I was able to find was to launch Libreoffice with a custom GTK theme so that it doesn’t use OS font settings (which results in menus being tiny as everything else and not bigger than everything else) and then use the Font Scaling option to make everything grow at the same time.

To make the custom GTK theme, which in this case will only change the fonts, I created a file called ~/mytheme.gtkrc (it can be placed anywhere) and put this on it (replace Ubuntu by your default OS font, and 11 by the default font size):

style "Ubuntu"
font_name = "Ubuntu 11"
widget_class "*" style "Ubuntu"
gtk-font-name = "Ubuntu 11"

Then to launch e.g. Libreoffice Calc using this custom theme I type in terminal:

GTK2_RC_FILES=~/mytheme.gtkrc libreoffice --calc

However if you put this in the Libreoffice Calc menu entry (alacarte) command box it won’t work for two reasons:

  1. you can’t use ~ to mean your home folder, you have to type the full path, e.g.:

    GTK2_RC_FILES=/home/USERNAME/mytheme.gtkrc libreoffice --calc

  2. you have to put “env” before everything (don’t know why but that’s what others have done), like this:

    env GTK2_RC_FILES=/home/USERNAME/mytheme.gtkrc libreoffice --calc

After that the launcher opens Libreoffice calc “ignoring” OS globbal font settings.

Note: I did this for Calc because it’s the application I use the most but it should be possible to edit the respective menu entries for other Libreoffice apps. In the command above replace libreoffice --calc by libreoffice --writer, libreoffice --impress, etc.
EDIT: I just tried opening some other apps without editing their menu entries and they also seem to use the custom GTK theme, so you might not need to edit each app’s menu entry after you have edited one

Lastly I go to Options > Libreoffice > View > User interface > Scaling and adjust it to my desired amount.

After doing all this not everything seems to have grown equally (like the status bar) but at least the dialogs and menus have the same font size which is a big improvement.

Tested on version on Ubuntu Mate 16.

All credit goes here: