This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Smaller font size in GTK3 applications

Tags: None
(comma "," separated)
sspphheerraa
Registered Member
Posts
23
Karma
0
OS
Hello.
I have set font size to 10 (at Widget Style of GNOME/GTK Applications). The same size (10) is at qt-applications.
~/.config/gtk-3.0/settings.ini
Code: Select all
[Settings]
gtk-font-name=Noto Sans Regular 10
gtk-theme-name=Breeze
gtk-icon-theme-name=breeze
gtk-fallback-icon-theme=Adwaita
gtk-cursor-theme-name=breeze_cursors
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-menu-images=1
gtk-button-images=1
gtk-primary-button-warps-slider=0
gtk-cursor-blink = 0

~/.gtkrc-2.0
Code: Select all
# File created by KDE Gtk Config
# Configs for GTK2 programs

include "/usr/share/themes/Breeze/gtk-2.0/gtkrc"
style "user-font"
{
   font_name="Noto Sans Regular"
}
widget_class "*" style "user-font"
gtk-font-name="Noto Sans Regular 10"
gtk-theme-name="Breeze"
gtk-icon-theme-name="breeze"
gtk-fallback-icon-theme="Adwaita"
gtk-cursor-theme-name="breeze_cursors"
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-menu-images=1
gtk-button-images=1
gtk-primary-button-warps-slider=0
gtk-cursor-blink = 0

But the size of menu font is different in GIMP (GTK2 only) and Virtual-Manager (GTK3 only). It seems to be 4 points difference.
Image
Why it is so?

* Gentoo linux
* KDE Frameworks 5.34.0
* Qt 5.7.1 (built against 5.7.1)
* The xcb windowing system
sspphheerraa
Registered Member
Posts
23
Karma
0
OS
Found out - dpi.
I have /etc/X11/xorg.conf.d/10monitor.conf
Code: Select all
Section "Monitor"
    Identifier     "LVDS-1"
    DisplaySize   381   214
EndSection

So, dpi is 128, but GTK3 ignores that (it calculates size from 96). Why?
sspphheerraa
Registered Member
Posts
23
Karma
0
OS
Workaround.
~/.bash_profile
Code: Select all
export GDK_DPI_SCALE=1.33
wolfi323
Registered Member
Posts
1129
Karma
11
OS
sspphheerraa wrote:So, dpi is 128, but GTK3 ignores that (it calculates size from 96). Why?

See https://bugzilla.gnome.org/show_bug.cgi?id=757142
sspphheerraa
Registered Member
Posts
23
Karma
0
OS


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]