unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#45124: Subject: 27.1; Image rendered from svg is too small on a hdpi display
@ 2020-12-08 18:28 Dov Grobgeld
  2020-12-09  0:08 ` Alan Third
  0 siblings, 1 reply; 3+ messages in thread
From: Dov Grobgeld @ 2020-12-08 18:28 UTC (permalink / raw)
  To: 45124


[-- Attachment #1.1: Type: text/plain, Size: 25883 bytes --]

When loading an svg file into emacs by find file, e.g. the attached file
inkscape-drawing.svg, it is not rendered by the active x11 resolution. The
svg file has a native size of about 173.mm, but when loaded into emacs, its
width becomes about 95mm. My monitor is a 4k 27" screen which has a dpi of
about 163. It thus appears that the svg file is rendered at 90 dpi, since
90/167*173 ≈ 95.

Note that xdpinfo properly returns:

  resolution:    162x161 dots per inch

--
In GNU Emacs 27.1 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.22,
cairo version 1.16.0)
 of 2020-08-21 built on buildhw-x86-03.iad2.fedoraproject.org
Windowing system distributor 'Fedora Project', version 11.0.12010000
System Description: Fedora 33 (Workstation Edition)

Recent messages:
Current locus from *grep*
Mark set
Grep finished with no matches found
Mark set
Grep finished with matches found [2 times]
Mark saved where search started [3 times]
Mark set
Mark saved where search started [2 times]
Type C-c C-c or C-c C-x to view the image as text or hex. [2 times]
delete-backward-char: Text is read-only

Configured using:
 'configure --build=x86_64-redhat-linux-gnu
 --host=x86_64-redhat-linux-gnu --program-prefix=
 --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
 --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
 --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
 --libexecdir=/usr/libexec --localstatedir=/var
 --sharedstatedir=/var/lib --mandir=/usr/share/man
 --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
 --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3
 --with-gpm=no --with-xwidgets --with-modules --with-harfbuzz
 --with-cairo --with-json build_alias=x86_64-redhat-linux-gnu
 host_alias=x86_64-redhat-linux-gnu CC=gcc 'CFLAGS=-DMAIL_USE_LOCKF -O2
 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches
 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
 -Wp,-D_GLIBCXX_ASSERTIONS
 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
 LDFLAGS=-Wl,-z,relro
 PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS
LIBSYSTEMD JSON PDUMPER GMP

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Image[svg]

Minor modes in effect:
  py-pdbtrack-is-tracking-p: t
  xmsi-mode: t
  show-paren-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  global-magit-file-mode: t
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  shell-dirtrack-mode: t
  async-bytecomp-package-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/dov/git/dov-env/emacs/telega hides
/home/dov/git/dov-env/emacs//telega.el/telega
/home/dov/git/dov-env/emacs/dash-functional hides
/home/dov/git/dov-env/emacs/packages/dash-functional-20191109.1327/dash-functional
/home/dov/git/dov-env/emacs/markdown-mode hides
/home/dov/git/dov-env/emacs/packages/markdown-mode-20200421.2222/markdown-mode
/home/dov/git/dov-env/emacs/neotree hides
/home/dov/git/dov-env/emacs/packages/neotree-20200324.1946/neotree
/home/dov/git/dov-env/emacs/s hides
/home/dov/git/dov-env/emacs/packages/s-20180406.808/s
/home/dov/git/dov-env/emacs/dash hides
/home/dov/git/dov-env/emacs/packages/dash-20180413.30/dash
/home/dov/git/dov-env/emacs/request hides
/home/dov/git/dov-env/emacs//ein/lisp/request
/home/dov/git/dov-env/emacs/websocket hides
/home/dov/git/dov-env/emacs//ein/lisp/websocket
/home/dov/git/dov-env/emacs//org-mode/lisp/org-eww hides
/home/dov/git/dov-env/emacs//org-mode/contrib/lisp/org-eww
/home/dov/git/dov-env/emacs/htmlize hides
/home/dov/git/dov-env/emacs//org-mode/contrib/lisp/htmlize
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company-capf
hides /home/dov/git/dov-env/emacs//company/company-capf
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company-tempo
hides /home/dov/git/dov-env/emacs//company/company-tempo
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company-bbdb
hides /home/dov/git/dov-env/emacs//company/company-bbdb
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company-semantic
hides /home/dov/git/dov-env/emacs//company/company-semantic
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company-eclim
hides /home/dov/git/dov-env/emacs//company/company-eclim
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company-gtags
hides /home/dov/git/dov-env/emacs//company/company-gtags
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company-xcode
hides /home/dov/git/dov-env/emacs//company/company-xcode
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company-etags
hides /home/dov/git/dov-env/emacs//company/company-etags
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company-ispell
hides /home/dov/git/dov-env/emacs//company/company-ispell
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company-dabbrev
hides /home/dov/git/dov-env/emacs//company/company-dabbrev
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company-dabbrev-code
hides /home/dov/git/dov-env/emacs//company/company-dabbrev-code
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company-keywords
hides /home/dov/git/dov-env/emacs//company/company-keywords
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company-tng
hides /home/dov/git/dov-env/emacs//company/company-tng
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company-yasnippet
hides /home/dov/git/dov-env/emacs//company/company-yasnippet
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company-oddmuse
hides /home/dov/git/dov-env/emacs//company/company-oddmuse
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company-elisp
hides /home/dov/git/dov-env/emacs//company/company-elisp
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company-template
hides /home/dov/git/dov-env/emacs//company/company-template
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company hides
/home/dov/git/dov-env/emacs//company/company
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company-abbrev
hides /home/dov/git/dov-env/emacs//company/company-abbrev
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company-cmake
hides /home/dov/git/dov-env/emacs//company/company-cmake
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company-css
hides /home/dov/git/dov-env/emacs//company/company-css
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company-files
hides /home/dov/git/dov-env/emacs//company/company-files
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company-nxml
hides /home/dov/git/dov-env/emacs//company/company-nxml
/home/dov/git/dov-env/emacs/packages/company-20200324.2145/company-clang
hides /home/dov/git/dov-env/emacs//company/company-clang
/home/dov/git/dov-env/emacs/auto-complete hides
/home/dov/.emacs.d/elpa/auto-complete-20160107.8/auto-complete
/home/dov/git/dov-env/emacs/rec-mode hides
/usr/share/emacs/site-lisp/rec-mode
/home/dov/git/dov-env/emacs/cmake-mode hides
/usr/share/emacs/site-lisp/cmake/cmake-mode
/home/dov/git/dov-env/emacs/gdb-mi hides
/usr/share/emacs/27.1/lisp/progmodes/gdb-mi
/home/dov/git/dov-env/emacs/ps-mode hides
/usr/share/emacs/27.1/lisp/progmodes/ps-mode
/home/dov/git/dov-env/emacs//org-mode/lisp/org-plot hides
/usr/share/emacs/27.1/lisp/org/org-plot
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-table hides
/usr/share/emacs/27.1/lisp/org/ob-table
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-fortran hides
/usr/share/emacs/27.1/lisp/org/ob-fortran
/home/dov/git/dov-env/emacs//org-mode/lisp/org-element hides
/usr/share/emacs/27.1/lisp/org/org-element
/home/dov/git/dov-env/emacs//org-mode/lisp/org-footnote hides
/usr/share/emacs/27.1/lisp/org/org-footnote
/home/dov/git/dov-env/emacs//org-mode/lisp/ox-ascii hides
/usr/share/emacs/27.1/lisp/org/ox-ascii
/home/dov/git/dov-env/emacs//org-mode/lisp/org-table hides
/usr/share/emacs/27.1/lisp/org/org-table
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-tangle hides
/usr/share/emacs/27.1/lisp/org/ob-tangle
/home/dov/git/dov-env/emacs//org-mode/lisp/org-crypt hides
/usr/share/emacs/27.1/lisp/org/org-crypt
/home/dov/git/dov-env/emacs//org-mode/lisp/org-timer hides
/usr/share/emacs/27.1/lisp/org/org-timer
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-shen hides
/usr/share/emacs/27.1/lisp/org/ob-shen
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-abc hides
/usr/share/emacs/27.1/lisp/org/ob-abc
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-J hides
/usr/share/emacs/27.1/lisp/org/ob-J
/home/dov/git/dov-env/emacs//org-mode/lisp/org-goto hides
/usr/share/emacs/27.1/lisp/org/org-goto
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-processing hides
/usr/share/emacs/27.1/lisp/org/ob-processing
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-calc hides
/usr/share/emacs/27.1/lisp/org/ob-calc
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-sed hides
/usr/share/emacs/27.1/lisp/org/ob-sed
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-makefile hides
/usr/share/emacs/27.1/lisp/org/ob-makefile
/home/dov/git/dov-env/emacs//org-mode/lisp/org-protocol hides
/usr/share/emacs/27.1/lisp/org/org-protocol
/home/dov/git/dov-env/emacs//org-mode/lisp/org-macro hides
/usr/share/emacs/27.1/lisp/org/org-macro
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-haskell hides
/usr/share/emacs/27.1/lisp/org/ob-haskell
/home/dov/git/dov-env/emacs//org-mode/lisp/ox-odt hides
/usr/share/emacs/27.1/lisp/org/ox-odt
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-emacs-lisp hides
/usr/share/emacs/27.1/lisp/org/ob-emacs-lisp
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-python hides
/usr/share/emacs/27.1/lisp/org/ob-python
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-java hides
/usr/share/emacs/27.1/lisp/org/ob-java
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-forth hides
/usr/share/emacs/27.1/lisp/org/ob-forth
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-ref hides
/usr/share/emacs/27.1/lisp/org/ob-ref
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-comint hides
/usr/share/emacs/27.1/lisp/org/ob-comint
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-gnuplot hides
/usr/share/emacs/27.1/lisp/org/ob-gnuplot
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-awk hides
/usr/share/emacs/27.1/lisp/org/ob-awk
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-ditaa hides
/usr/share/emacs/27.1/lisp/org/ob-ditaa
/home/dov/git/dov-env/emacs//org-mode/lisp/org-ctags hides
/usr/share/emacs/27.1/lisp/org/org-ctags
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-eval hides
/usr/share/emacs/27.1/lisp/org/ob-eval
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-groovy hides
/usr/share/emacs/27.1/lisp/org/ob-groovy
/home/dov/git/dov-env/emacs//org-mode/lisp/ox-md hides
/usr/share/emacs/27.1/lisp/org/ox-md
/home/dov/git/dov-env/emacs//org-mode/lisp/org-list hides
/usr/share/emacs/27.1/lisp/org/org-list
/home/dov/git/dov-env/emacs//org-mode/lisp/org-macs hides
/usr/share/emacs/27.1/lisp/org/org-macs
/home/dov/git/dov-env/emacs//org-mode/lisp/ox-org hides
/usr/share/emacs/27.1/lisp/org/ox-org
/home/dov/git/dov-env/emacs//org-mode/lisp/org-entities hides
/usr/share/emacs/27.1/lisp/org/org-entities
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-stan hides
/usr/share/emacs/27.1/lisp/org/ob-stan
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-R hides
/usr/share/emacs/27.1/lisp/org/ob-R
/home/dov/git/dov-env/emacs//org-mode/lisp/org-inlinetask hides
/usr/share/emacs/27.1/lisp/org/org-inlinetask
/home/dov/git/dov-env/emacs//org-mode/lisp/org-lint hides
/usr/share/emacs/27.1/lisp/org/org-lint
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-clojure hides
/usr/share/emacs/27.1/lisp/org/ob-clojure
/home/dov/git/dov-env/emacs//org-mode/lisp/org-pcomplete hides
/usr/share/emacs/27.1/lisp/org/org-pcomplete
/home/dov/git/dov-env/emacs//org-mode/lisp/org-mouse hides
/usr/share/emacs/27.1/lisp/org/org-mouse
/home/dov/git/dov-env/emacs//org-mode/lisp/org-compat hides
/usr/share/emacs/27.1/lisp/org/org-compat
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-screen hides
/usr/share/emacs/27.1/lisp/org/ob-screen
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-org hides
/usr/share/emacs/27.1/lisp/org/ob-org
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-perl hides
/usr/share/emacs/27.1/lisp/org/ob-perl
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-C hides
/usr/share/emacs/27.1/lisp/org/ob-C
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-latex hides
/usr/share/emacs/27.1/lisp/org/ob-latex
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-ledger hides
/usr/share/emacs/27.1/lisp/org/ob-ledger
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-exp hides
/usr/share/emacs/27.1/lisp/org/ob-exp
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-octave hides
/usr/share/emacs/27.1/lisp/org/ob-octave
/home/dov/git/dov-env/emacs//org-mode/lisp/org-src hides
/usr/share/emacs/27.1/lisp/org/org-src
/home/dov/git/dov-env/emacs//org-mode/lisp/ox-latex hides
/usr/share/emacs/27.1/lisp/org/ox-latex
/home/dov/git/dov-env/emacs//org-mode/lisp/org-tempo hides
/usr/share/emacs/27.1/lisp/org/org-tempo
/home/dov/git/dov-env/emacs//org-mode/lisp/org-duration hides
/usr/share/emacs/27.1/lisp/org/org-duration
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-plantuml hides
/usr/share/emacs/27.1/lisp/org/ob-plantuml
/home/dov/git/dov-env/emacs//org-mode/lisp/ox-publish hides
/usr/share/emacs/27.1/lisp/org/ox-publish
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-scheme hides
/usr/share/emacs/27.1/lisp/org/ob-scheme
/home/dov/git/dov-env/emacs//org-mode/lisp/org-colview hides
/usr/share/emacs/27.1/lisp/org/org-colview
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-asymptote hides
/usr/share/emacs/27.1/lisp/org/ob-asymptote
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-shell hides
/usr/share/emacs/27.1/lisp/org/ob-shell
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-lilypond hides
/usr/share/emacs/27.1/lisp/org/ob-lilypond
/home/dov/git/dov-env/emacs//org-mode/lisp/org-install hides
/usr/share/emacs/27.1/lisp/org/org-install
/home/dov/git/dov-env/emacs//org-mode/lisp/org-capture hides
/usr/share/emacs/27.1/lisp/org/org-capture
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-ocaml hides
/usr/share/emacs/27.1/lisp/org/ob-ocaml
/home/dov/git/dov-env/emacs//org-mode/lisp/org-datetree hides
/usr/share/emacs/27.1/lisp/org/org-datetree
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-sqlite hides
/usr/share/emacs/27.1/lisp/org/ob-sqlite
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-hledger hides
/usr/share/emacs/27.1/lisp/org/ob-hledger
/home/dov/git/dov-env/emacs//org-mode/lisp/org-attach hides
/usr/share/emacs/27.1/lisp/org/org-attach
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-maxima hides
/usr/share/emacs/27.1/lisp/org/ob-maxima
/home/dov/git/dov-env/emacs//org-mode/lisp/org-indent hides
/usr/share/emacs/27.1/lisp/org/org-indent
/home/dov/git/dov-env/emacs//org-mode/lisp/ox-man hides
/usr/share/emacs/27.1/lisp/org/ox-man
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-lua hides
/usr/share/emacs/27.1/lisp/org/ob-lua
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-sass hides
/usr/share/emacs/27.1/lisp/org/ob-sass
/home/dov/git/dov-env/emacs//org-mode/lisp/org-clock hides
/usr/share/emacs/27.1/lisp/org/org-clock
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-coq hides
/usr/share/emacs/27.1/lisp/org/ob-coq
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-mscgen hides
/usr/share/emacs/27.1/lisp/org/ob-mscgen
/home/dov/git/dov-env/emacs//org-mode/lisp/ox-icalendar hides
/usr/share/emacs/27.1/lisp/org/ox-icalendar
/home/dov/git/dov-env/emacs//org-mode/lisp/ox-texinfo hides
/usr/share/emacs/27.1/lisp/org/ox-texinfo
/home/dov/git/dov-env/emacs//org-mode/lisp/ox-beamer hides
/usr/share/emacs/27.1/lisp/org/ox-beamer
/home/dov/git/dov-env/emacs//org-mode/lisp/org-feed hides
/usr/share/emacs/27.1/lisp/org/org-feed
/home/dov/git/dov-env/emacs//org-mode/lisp/org-mobile hides
/usr/share/emacs/27.1/lisp/org/org-mobile
/home/dov/git/dov-env/emacs//org-mode/lisp/ox-html hides
/usr/share/emacs/27.1/lisp/org/ox-html
/home/dov/git/dov-env/emacs//org-mode/lisp/ob hides
/usr/share/emacs/27.1/lisp/org/ob
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-ebnf hides
/usr/share/emacs/27.1/lisp/org/ob-ebnf
/home/dov/git/dov-env/emacs//org-mode/lisp/ox hides
/usr/share/emacs/27.1/lisp/org/ox
/home/dov/git/dov-env/emacs//org-mode/lisp/org-loaddefs hides
/usr/share/emacs/27.1/lisp/org/org-loaddefs
/home/dov/git/dov-env/emacs//org-mode/lisp/org-agenda hides
/usr/share/emacs/27.1/lisp/org/org-agenda
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-core hides
/usr/share/emacs/27.1/lisp/org/ob-core
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-css hides
/usr/share/emacs/27.1/lisp/org/ob-css
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-js hides
/usr/share/emacs/27.1/lisp/org/ob-js
/home/dov/git/dov-env/emacs//org-mode/lisp/org-habit hides
/usr/share/emacs/27.1/lisp/org/org-habit
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-lisp hides
/usr/share/emacs/27.1/lisp/org/ob-lisp
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-vala hides
/usr/share/emacs/27.1/lisp/org/ob-vala
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-ruby hides
/usr/share/emacs/27.1/lisp/org/ob-ruby
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-dot hides
/usr/share/emacs/27.1/lisp/org/ob-dot
/home/dov/git/dov-env/emacs//org-mode/lisp/org-archive hides
/usr/share/emacs/27.1/lisp/org/org-archive
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-lob hides
/usr/share/emacs/27.1/lisp/org/ob-lob
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-picolisp hides
/usr/share/emacs/27.1/lisp/org/ob-picolisp
/home/dov/git/dov-env/emacs//org-mode/lisp/org hides
/usr/share/emacs/27.1/lisp/org/org
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-matlab hides
/usr/share/emacs/27.1/lisp/org/ob-matlab
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-io hides
/usr/share/emacs/27.1/lisp/org/ob-io
/home/dov/git/dov-env/emacs//org-mode/lisp/ob-sql hides
/usr/share/emacs/27.1/lisp/org/ob-sql
/home/dov/git/dov-env/emacs//org-mode/lisp/org-faces hides
/usr/share/emacs/27.1/lisp/org/org-faces
/home/dov/git/dov-env/emacs//org-mode/lisp/org-version hides
/usr/share/emacs/27.1/lisp/org/org-version
/home/dov/git/dov-env/emacs//org-mode/lisp/org-id hides
/usr/share/emacs/27.1/lisp/org/org-id
/home/dov/git/dov-env/emacs/longlines hides
/usr/share/emacs/27.1/lisp/obsolete/longlines

Features:
(shadow sort mail-extr emacsbug etags fileloop xref project
bug-reference vc vc-dispatcher rng-xsd xsd-regexp rng-cmpct rng-nxml
rng-valid nxml-mode nxml-outln nxml-rap sgml-mode cl-print calc-sel
calc-vec calc-aent calc-menu calc-yank calc-ext calc calc-loaddefs
calc-macs eieio-opt speedbar sb-image ezimage dframe help-fns pcmpl-unix
xjet-remote-client bindat python tabify man helm-command helm-elisp
helm-eval edebug helm-info helm-mode helm-files image-dired dired-x
helm-tags helm-locate dabbrev dired-aux winner helm-buffers helm-grep
wgrep-helm helm-regexp helm-utils helm-help helm-types helm helm-source
eieio-compat helm-multi-match helm-lib wdired org-duration org-clock
org-agenda mule-util cal-move ox-beamer ffap cus-edit rfc2104
tramp-cache misearch multi-isearch .loaddefs el-get el-get-autoloading
el-get-list-packages el-get-dependencies el-get-build el-get-status
el-get-methods el-get-fossil el-get-svn el-get-pacman el-get-github-zip
el-get-github-tar el-get-http-zip el-get-http-tar el-get-hg el-get-go
el-get-git-svn el-get-fink el-get-emacswiki el-get-http el-get-notify
el-get-emacsmirror el-get-github el-get-git el-get-elpa el-get-darcs
el-get-cvs el-get-bzr el-get-brew el-get-builtin el-get-apt-get
el-get-recipes el-get-byte-compile el-get-custom el-get-core autoload
radix-tree lisp-mnt org-table xmsi-math-symbols-input face-remap org-man
screenshot ox-slidy ox-s5 org-bullets org-wikipedia org-jira-hyperlink
org-redmine-hyperlink org-comeet-hyperlink org-git-hyperlink org-eww
org-rmail org-mhe org-irc org-info org-gnus nnir org-docview doc-view
image-mode exif org-bibtex bibtex org-bbdb org-w3m paren cus-start
cus-load zoom-frm frame-cmds frame-fns avoid js-doc iswitchb google-look
qtdoc git-find-file ob-lua ob-C cc-mode cc-fonts cc-guess cc-menus
cc-styles cc-align ob-R ob-octave matlab gud ob-plantuml ob-asymptote
ob-dot ob-ditaa ob-python ob-perl ob-shell python-mode info-look
tramp-sh hippie-exp flymake-proc flymake ert ewoc debug backtrace
cc-cmds cc-engine cc-vars cc-defs persistent iimage org-crypt
load-theme-buffer-local ox-reveal ox-mediawiki ox-odt rng-loc rng-uri
rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns
nxml-enc xmltok nxml-util ox-latex ox-icalendar ox-html table ox-ascii
ox-publish ox s dmacro tramp tramp-loaddefs trampver tramp-integration
tramp-compat ls-lisp color-moccur dired-details+ dired-details
sourcepair tempo xml-parse doxymacs ack epa-file files-x jka-compr
yasnippet visual-regexp-steroids visual-regexp pcre2el rxt re-builder
pydoc org-element avl-tree generator org ob ob-tangle ob-ref ob-lob
ob-table ob-exp org-macro org-footnote org-src ob-comint ob-keys
org-pcomplete org-list org-faces org-entities noutline outline
org-version ob-emacs-lisp ob-core ob-eval org-compat org-macs cal-menu
calendar cal-loaddefs gnus-sum shr svg dom gnus-group gnus-undo
gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo
parse-time iso8601 gnus-spec gnus-int gnus-range gnus-win gnus nnheader
goto-addr browse-kill-ring pretty-mode wgrep grep compile ein-loaddefs
org-loaddefs magit-bookmark bookmark pp magit-imenu git-rebase
magit-extras magit-ediff ediff ediff-merg ediff-mult ediff-wind
ediff-diff ediff-help ediff-init ediff-util magit-subtree
magit-submodule magit-obsolete magit-blame magit-stash magit-bisect
magit-remote magit-commit magit-sequence magit-notes magit-worktree
magit-tag magit-merge magit-branch magit-reset magit-collab magit-files
magit-refs magit-status magit magit-repos magit-apply magit-wip
magit-log which-func imenu magit-diff smerge-mode diff magit-core
magit-autorevert autorevert filenotify magit-process magit-margin
magit-mode git-commit recentf tree-widget magit-git magit-section
magit-utils vc-git diff-mode ido crm log-edit message rfc822 mml mml-sec
epa epg epg-config gnus-util rmail rmail-loaddefs text-property-search
time-date mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader
pcvs-util add-log ghub url-http mail-parse rfc2231 url-gw nsm rmc puny
url-auth url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-domsuf url-util mailcap magit-popup format-spec
with-editor cl-extra warnings term disp-table ehelp eshell esh-cmd
esh-ext esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util
dired dired-loaddefs shell pcomplete comint server sticky-w
init-flycheck flycheck ansi-color find-func help-mode rx init-ssh-agency
ssh-agency init-telega telega telega-info telega-chat telega-msg
telega-root derived telega-filter wid-edit telega-server
telega-customize telega-core ring init-helm helm-config helm-easymenu
async-bytecomp async pcase init-multiple-cursors multiple-cursors
mc-hide-unmatched-lines-mode mc-separate-operations
rectangular-region-mode mc-mark-pop mc-mark-more thingatpt
mc-cycle-cursors mc-edit-lines multiple-cursors-core easy-mmode edmacro
kmacro advice rect finder-inf info smtpmail sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils dash cl clang-rename
clang-include-fixer let-alist clang-format xml package easymenu
browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq
byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win
x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer 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 charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting xwidget-internal cairo move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 1723715 217626)
 (symbols 48 68511 9)
 (strings 32 254044 19717)
 (string-bytes 1 8939991)
 (vectors 16 79683)
 (vector-slots 8 1897520 134044)
 (floats 8 417 460)
 (intervals 56 54553 562)
 (buffers 1000 146))

[-- Attachment #1.2: Type: text/html, Size: 27155 bytes --]

[-- Attachment #2: inkscape-drawing.svg --]
[-- Type: image/svg+xml, Size: 3248 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#45124: Subject: 27.1; Image rendered from svg is too small on a hdpi display
  2020-12-08 18:28 bug#45124: Subject: 27.1; Image rendered from svg is too small on a hdpi display Dov Grobgeld
@ 2020-12-09  0:08 ` Alan Third
  2020-12-12 10:47   ` Alan Third
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Third @ 2020-12-09  0:08 UTC (permalink / raw)
  To: Dov Grobgeld; +Cc: 45124

[-- Attachment #1: Type: text/plain, Size: 847 bytes --]

On Tue, Dec 08, 2020 at 08:28:43PM +0200, Dov Grobgeld wrote:
> When loading an svg file into emacs by find file, e.g. the attached file
> inkscape-drawing.svg, it is not rendered by the active x11 resolution. The
> svg file has a native size of about 173.mm, but when loaded into emacs, its
> width becomes about 95mm. My monitor is a 4k 27" screen which has a dpi of
> about 163. It thus appears that the svg file is rendered at 90 dpi, since
> 90/167*173 ≈ 95.
> 
> Note that xdpinfo properly returns:
> 
>   resolution:    162x161 dots per inch

Something like the attached (patch against the master branch) might do
the trick...

This makes everything smaller on macOS, which isn't great because on
my laptop everything is already too small. I'm not sure what we'd have
to do to get SVGs rendering at roughly the right size.
-- 
Alan Third

[-- Attachment #2: 0001-Use-real-DPI-when-rendering-SVGs-bug-45124.patch --]
[-- Type: text/plain, Size: 4478 bytes --]

From 5a9e26a16b46797d10dee5c725877177d750e536 Mon Sep 17 00:00:00 2001
From: Alan Third <alan@idiocy.org>
Date: Wed, 9 Dec 2020 00:02:44 +0000
Subject: [PATCH] Use real DPI when rendering SVGs (bug#45124)

* src/image.c (svg_css_length_to_pixels): Pass in a DPI value instead
of using a hard coded value.
(svg_load_image): Set the DPI on the rsvg_handle, and pass it to
svg_css_length_to_pixels.
---
 src/image.c | 31 +++++++++++++++++++++----------
 1 file changed, 21 insertions(+), 10 deletions(-)

diff --git a/src/image.c b/src/image.c
index f16b9454a1..1523b4c5e3 100644
--- a/src/image.c
+++ b/src/image.c
@@ -9759,11 +9759,8 @@ svg_load (struct frame *f, struct image *img)
 
 #if LIBRSVG_CHECK_VERSION (2, 46, 0)
 static double
-svg_css_length_to_pixels (RsvgLength length)
+svg_css_length_to_pixels (RsvgLength length, double dpi)
 {
-  /* FIXME: 96 appears to be a pretty standard DPI but we should
-     probably use the real DPI if we can get it.  */
-  double dpi = 96;
   double value = length.length;
 
   switch (length.unit)
@@ -9837,6 +9834,9 @@ svg_load_image (struct frame *f, struct image *img, char *contents,
   rsvg_handle = rsvg_handle_new_from_stream_sync (input_stream, base_file,
 						  RSVG_HANDLE_FLAGS_NONE,
 						  NULL, &err);
+  rsvg_handle_set_dpi_x_y (rsvg_handle, FRAME_DISPLAY_INFO (f)->resx,
+                           FRAME_DISPLAY_INFO (f)->resy);
+
   if (base_file)
     g_object_unref (base_file);
   g_object_unref (input_stream);
@@ -9848,6 +9848,9 @@ svg_load_image (struct frame *f, struct image *img, char *contents,
   rsvg_handle = rsvg_handle_new ();
   eassume (rsvg_handle);
 
+  rsvg_handle_set_dpi_x_y (rsvg_handle, FRAME_DISPLAY_INFO (f)->resx,
+                           FRAME_DISPLAY_INFO (f)->resy);
+
   /* Set base_uri for properly handling referenced images (via 'href').
      Can be explicitly specified using `:base_uri' image property.
      See rsvg bug 596114 - "image refs are relative to curdir, not .svg file"
@@ -9872,6 +9875,7 @@ svg_load_image (struct frame *f, struct image *img, char *contents,
   /* Try the instrinsic dimensions first.  */
   gboolean has_width, has_height, has_viewbox;
   RsvgLength iwidth, iheight;
+  double dpi = FRAME_DISPLAY_INFO (f)->resx;
 
   rsvg_handle_get_intrinsic_dimensions (rsvg_handle,
                                         &has_width, &iwidth,
@@ -9881,19 +9885,19 @@ svg_load_image (struct frame *f, struct image *img, char *contents,
   if (has_width && has_height)
     {
       /* Success!  We can use these values directly.  */
-      viewbox_width = svg_css_length_to_pixels (iwidth);
-      viewbox_height = svg_css_length_to_pixels (iheight);
+      viewbox_width = svg_css_length_to_pixels (iwidth, dpi);
+      viewbox_height = svg_css_length_to_pixels (iheight, dpi);
     }
   else if (has_width && has_viewbox)
     {
-      viewbox_width = svg_css_length_to_pixels (iwidth);
-      viewbox_height = svg_css_length_to_pixels (iwidth)
+      viewbox_width = svg_css_length_to_pixels (iwidth, dpi);
+      viewbox_height = svg_css_length_to_pixels (iwidth, dpi)
         * viewbox.width / viewbox.height;
     }
   else if (has_height && has_viewbox)
     {
-      viewbox_height = svg_css_length_to_pixels (iheight);
-      viewbox_width = svg_css_length_to_pixels (iheight)
+      viewbox_height = svg_css_length_to_pixels (iheight, dpi);
+      viewbox_width = svg_css_length_to_pixels (iheight, dpi)
         * viewbox.height / viewbox.width;
     }
   else if (has_viewbox)
@@ -10002,6 +10006,10 @@ svg_load_image (struct frame *f, struct image *img, char *contents,
   rsvg_handle = rsvg_handle_new_from_stream_sync (input_stream, base_file,
 						  RSVG_HANDLE_FLAGS_NONE,
 						  NULL, &err);
+
+  rsvg_handle_set_dpi_x_y (rsvg_handle, FRAME_DISPLAY_INFO (f)->resx,
+                           FRAME_DISPLAY_INFO (f)->resy);
+
   if (base_file)
     g_object_unref (base_file);
   g_object_unref (input_stream);
@@ -10013,6 +10021,9 @@ svg_load_image (struct frame *f, struct image *img, char *contents,
   rsvg_handle = rsvg_handle_new ();
   eassume (rsvg_handle);
 
+  rsvg_handle_set_dpi_x_y (rsvg_handle, FRAME_DISPLAY_INFO (f)->resx,
+                           FRAME_DISPLAY_INFO (f)->resy);
+
   /* Set base_uri for properly handling referenced images (via 'href').
      Can be explicitly specified using `:base_uri' image property.
      See rsvg bug 596114 - "image refs are relative to curdir, not .svg file"
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#45124: Subject: 27.1; Image rendered from svg is too small on a hdpi display
  2020-12-09  0:08 ` Alan Third
@ 2020-12-12 10:47   ` Alan Third
  0 siblings, 0 replies; 3+ messages in thread
From: Alan Third @ 2020-12-12 10:47 UTC (permalink / raw)
  To: Dov Grobgeld, 45124-done

On Wed, Dec 09, 2020 at 12:08:20AM +0000, Alan Third wrote:
> On Tue, Dec 08, 2020 at 08:28:43PM +0200, Dov Grobgeld wrote:
> > When loading an svg file into emacs by find file, e.g. the attached file
> > inkscape-drawing.svg, it is not rendered by the active x11 resolution. The
> > svg file has a native size of about 173.mm, but when loaded into emacs, its
> > width becomes about 95mm. My monitor is a 4k 27" screen which has a dpi of
> > about 163. It thus appears that the svg file is rendered at 90 dpi, since
> > 90/167*173 ≈ 95.
> > 
> > Note that xdpinfo properly returns:
> > 
> >   resolution:    162x161 dots per inch
> 
> Something like the attached (patch against the master branch) might do
> the trick...
> 
> This makes everything smaller on macOS, which isn't great because on
> my laptop everything is already too small. I'm not sure what we'd have
> to do to get SVGs rendering at roughly the right size.

I've pushed this change to the master branch. If it doesn't solve your
problem please reply to this email and we can reopen the bug report.
-- 
Alan Third





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-12 10:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-08 18:28 bug#45124: Subject: 27.1; Image rendered from svg is too small on a hdpi display Dov Grobgeld
2020-12-09  0:08 ` Alan Third
2020-12-12 10:47   ` Alan Third

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).