Subject: bug#55394: 29.0.50; pgtk: Text scaling of host OS is exaggerated in Emacs

From: Torsten Bronger <[email-masked]>
Date: Fri, 13 May 2022 09:50:46 +0200

Using Emacs on Ubuntu 22.04 with Wayland and pgtk, if I set a text
scaling factor using

    dconf write /org/gnome/desktop/interface/text-scaling-factor 2.0

the value (2.0 in this case) is exaggerated in Emacs.  In other words,
an increase in font size increases the size in the shell (Gnome
Terminal) less strongly than in Emacs.  When compiling without pgtk, the
font sizes always match.

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0)
 of 2022-05-13 built on wolowitz
Repository revision: 62636ea3c1198fe0232842f73dead608a96de171
Repository branch: HEAD
System Description: Ubuntu 22.04 LTS

Configured using:
 'configure --prefix=/usr/ --mandir=/usr/share/man/
 --infodir=/usr/share/info/ --with-x-toolkit=no --with-xpm --with-jpeg
 --with-tiff --with-gif --with-png --with-pgtk
 --with-file-notification=inotify'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY
PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS WEBP XIM GTK3 ZLIB

Important settings:
  value of $EMACSLOADPATH: /home/bronger/.emacs.d/lisp:
  value of $LC_MONETARY: de_DE.UTF-8
  value of $LC_NUMERIC: de_DE.UTF-8
  value of $LC_TIME: de_DE.UTF-8
  value of $LANG: de_DE.UTF-8
  value of $XMODIFIERS: @im=fcitx
  locale-coding-system: utf-8-unix

Major mode: Group

Minor modes in effect:
  gnus-undo-mode: t
  TeX-PDF-mode: t
  global-auto-revert-mode: t
  savehist-mode: t
  display-time-mode: t
  desktop-save-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  buffer-read-only: t
  line-number-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/bronger/.emacs.d/elpa/transient-20220406.1156/transient hides /usr/share/emacs/29.0.50/lisp/transient

Features:
(shadow emacsbug canlock bbdb-message gnus-picon sort smiley gnus-cite
mail-extr textsec uni-scripts idna-mapping ucs-normalize uni-confusable
textsec-check gnus-bcklg gnus-draft gnus-async qp gnus-ml disp-table
format-spec pop3 nndraft nnmh gnus-agent gnus-srvr gnus-score score-mode
nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls
dig nnml nnfolder gnus-cache gnus-sum shr pixel-fill kinsoku url-file
url-dired svg dom bbdb-gnus bbdb-mua bbdb-com network-stream nsm nntp
gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud nnimap nnmail
mail-source utf7 netrc nnoo parse-time iso8601 gnus-spec gnus-int
gnus-range gnus-win gnus nnheader range wid-edit flyspell ispell message
sendmail yank-media rmc puny rfc822 mml mml-sec epa derived epg rfc6068
epg-config gnus-util text-property-search mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr
mailabbrev mail-utils gmm-utils mailheader python comint ansi-color
vc-git diff-mode vc-dispatcher time-date sh-script smie executable
delight etags-table etags fileloop generator xref project ring tj3-mode
advice dired-x dired dired-loaddefs adaptive-wrap persistent-soft
list-utils pcache eieio-base font-utils unicode-fonts edmacro kmacro
mmm-mode mmm-univ mmm-class mmm-region mmm-auto mmm-vars mmm-utils
mmm-compat bbdb bbdb-site timezone cal-china lunar solar cal-dst
cal-bahai cal-islam cal-hebrew holidays hol-loaddefs appt diary-lib
diary-loaddefs cal-menu calendar cal-loaddefs tex-fold easy-mmode tex
dbus xml crm texmathp server cl-extra help-mode autorevert filenotify
savehist time desktop frameset cus-load tex-site cl info package
browse-url url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map url-vars seq gv subr-x byte-opt bytecomp
byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/pgtk-win pgtk-win term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice simple cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop
case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs faces cus-face macroexp files window
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget keymap hashtable-print-readable backquote threads dbusbind
inotify dynamic-setting system-font-setting font-render-setting cairo
gtk pgtk lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 460662 23166)
 (symbols 48 24012 4)
 (strings 32 145108 3661)
 (string-bytes 1 3986495)
 (vectors 16 70827)
 (vector-slots 8 1845019 266107)
 (floats 8 760 54)
 (intervals 56 993 50)
 (buffers 992 30))

-- 
Torsten Bronger