GNU logs - #54688, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#54688: 29.0.50; Sliced image in margin looks bad
Resent-From: dalanicolai <dalanicolai@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 03 Apr 2022 06:57:02 +0000
Resent-Message-ID: <handler.54688.B.164896897827834 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 54688
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 54688 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.164896897827834
          (code B ref -1); Sun, 03 Apr 2022 06:57:02 +0000
Received: (at submit) by debbugs.gnu.org; 3 Apr 2022 06:56:18 +0000
Received: from localhost ([127.0.0.1]:47429 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nau9p-0007Er-AK
	for submit <at> debbugs.gnu.org; Sun, 03 Apr 2022 02:56:17 -0400
Received: from lists.gnu.org ([209.51.188.17]:38536)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dalanicolai@HIDDEN>) id 1nau9n-0007Ej-1c
 for submit <at> debbugs.gnu.org; Sun, 03 Apr 2022 02:56:15 -0400
Received: from eggs.gnu.org ([209.51.188.92]:48966)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <dalanicolai@HIDDEN>)
 id 1nau9m-0003N7-Q3
 for bug-gnu-emacs@HIDDEN; Sun, 03 Apr 2022 02:56:14 -0400
Received: from [2607:f8b0:4864:20::92a] (port=36551
 helo=mail-ua1-x92a.google.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <dalanicolai@HIDDEN>)
 id 1nau9k-0003eT-Mx
 for bug-gnu-emacs@HIDDEN; Sun, 03 Apr 2022 02:56:14 -0400
Received: by mail-ua1-x92a.google.com with SMTP id w21so2601522uan.3
 for <bug-gnu-emacs@HIDDEN>; Sat, 02 Apr 2022 23:56:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:from:date:message-id:subject:to;
 bh=PxoDK7lFPSQ/9nwoeBcZRMrs7s0fcgZO3BTzTcJnoW4=;
 b=kBY3tKQGs+ScPSKuiEbSFzQ6z+ZJ8l41EWMv0AVkQb58dBiSpnGdiO3CLE24sX+WyD
 5WBLlHeA4tqulvyik9Fs72S45HqT3DSeERuTADpiinz8JluewKAqPjE1+QMqEKY4Z3wF
 o3M4516eHsQWDxs94wg5vtBMDPLoJD8LN1x7ujlp42Vn9eFXIC0xVvvxmLkIbgck5mLZ
 9NU0jLsG01HgMdPlUsBcMSOE9ObCB41ypHyoXz406SjA3FNoVf6Bcl8xSTYgrI/l7qL6
 UNFubmnNfdzT1N+8vkCEKnsEeR+x9NRQI1DvMiOIZ+iaw1i5og0xUzavq8OLEUWMFnNX
 YHaA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=PxoDK7lFPSQ/9nwoeBcZRMrs7s0fcgZO3BTzTcJnoW4=;
 b=i4M70CH2PD1U3rEcbT7EGHJuyKYj3I/ss62Od3Pq26AQJcbb9F/xN36ixtWldq1ooE
 zHfBMFho73wwtJAaQ8iNeq9aL2Mh2V47RfZTarurUdzly1Jst1DY9V5YK8cG/UjD/Kmq
 xVEenznRKziqgFT6lA3+Hk7A1IFnVsNjPC4kd6uU7LQgVw+eJNuAbPvS0e7O6IK6Ti33
 SZ8th82/EZiHdDhHxsVWIlf9fK0q/oyH6es7m17cgsBpHO2nwGtPLQJLtMEnpwm4tApz
 tmDlV3dNVijcnkgGBq0BiKzU0H1Um/QtZr4cVKP5iejasNH+n4u99SI44lF7kVuItMkF
 ULhw==
X-Gm-Message-State: AOAM530/s92slTD6ZuAjlkJ0l5MhKkSAcrt+qwQ8JTDTRwyFmiTIOeIf
 tqPBX80il2ct+b65YLqbJfrkuV/qOeUZwfRqkia8cvvnQYB8IQ==
X-Google-Smtp-Source: ABdhPJyHHivpot/lOvxQkl09k7qn1LVxA7X0Q/oJfFg+yiN4RLEgUupfvdPzI20cZ/8WJASoQOSVTiRwwrBTjTxsGqM=
X-Received: by 2002:a81:1697:0:b0:2e9:d8ed:278 with SMTP id
 145-20020a811697000000b002e9d8ed0278mr17409445yww.452.1648968631447; Sat, 02
 Apr 2022 23:50:31 -0700 (PDT)
MIME-Version: 1.0
From: dalanicolai <dalanicolai@HIDDEN>
Date: Sun, 3 Apr 2022 08:50:20 +0200
Message-ID: <CACJP=3=U8oFrS8Gk8+nfCNrm+Avp_irXnrwZix5gra6Xn=3j+A@HIDDEN>
Content-Type: multipart/alternative; boundary="00000000000085f70e05dbba6d93"
X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::92a
 (failed)
Received-SPF: pass client-ip=2607:f8b0:4864:20::92a;
 envelope-from=dalanicolai@HIDDEN; helo=mail-ua1-x92a.google.com
X-Spam_score_int: -6
X-Spam_score: -0.7
X-Spam_bar: /
X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 HTML_MESSAGE=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001,
 RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.2 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

--00000000000085f70e05dbba6d93
Content-Type: text/plain; charset="UTF-8"

Passing 'left-margin' for the AREA parameter in `insert-sliced-image`
results in bad looking image. To reproduce from `emacs -q` evaluate the
following code example:

(with-current-buffer (get-buffer-create "test")
  (setq left-margin-width 5)
  (insert-sliced-image (svg-image (let* ((ph (line-pixel-height))
                                         (size (* 2 ph))
                                         (svg (svg-create size size)))
                                    (svg-circle svg ph ph ph :fill "red")
                                    svg))
                       nil
                       'left-margin
                       2)
  (switch-to-buffer (current-buffer)))

when instead of 'left-margin', nil is passed as value (i.e. the text is
inserted in the text area), then everything looks fine.

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.31,
cairo version 1.17.4)
 of 2022-01-29 built on fedora
Repository revision: 96533c18b7f9d75dce9e6bb534a16ed4ccf44ad1
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12014000
System Description: Fedora Linux 35 (Workstation Edition)

Configured using:
 'configure --with-modules --with-cairo --with-native-compilation
 --with-json'

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

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  marginalia-mode: t
  savehist-mode: t
  vertico-mode: t
  global-evil-surround-mode: t
  evil-surround-mode: t
  recentf-mode: t
  shell-dirtrack-mode: t
  evil-mode: t
  evil-local-mode: t
  windmove-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message yank-media rmc dired
dired-loaddefs rfc822 mml mml-sec epa epg rfc6068 epg-config gnus-util
time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mule-util cursor-sensor format-all language-id inheritenv
gitter derived pcase let-alist posframe transient format-spec request
autorevert filenotify mail-utils notifications dbus avy
shr-tag-pre-highlight language-detection shr text-property-search
pixel-fill kinsoku puny svg xml ewoc marginalia savehist orderless
vertico evil-surround evil-nerd-commenter evil-nerd-commenter-operator
evil-nerd-commenter-sdk sgml-mode facemenu dom which-key bind-map
recentf tree-widget wid-edit evil evil-keybindings evil-integration
evil-maps evil-commands reveal flyspell ispell evil-jumps
evil-command-window evil-types evil-search evil-ex shell pcomplete
comint ansi-color evil-macros evil-repeat evil-states evil-core comp
comp-cstr warnings rx advice evil-common windmove thingatpt rect
evil-digraphs evil-vars ring edmacro kmacro undo-tree diff cl-extra
help-mode use-package use-package-ensure use-package-delight
use-package-diminish use-package-bind-key bind-key easy-mmode
use-package-core finder-inf 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
chemacs iso-transl tooltip eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode 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 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 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 simple abbrev obarray cl-preloaded nadvice 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
move-toolbar gtk x-toolkit x multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 350688 17872)
 (symbols 48 22237 1)
 (strings 32 115274 5006)
 (string-bytes 1 3507701)
 (vectors 16 225348)
 (vector-slots 8 1419197 79043)
 (floats 8 90951 50)
 (intervals 56 651 0)
 (buffers 992 13))

--00000000000085f70e05dbba6d93
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Passing &#39;left-margin&#39; for the AREA parameter in `i=
nsert-sliced-image`<br>results in bad looking image. To reproduce from `ema=
cs -q` evaluate the<br>following code example:<br><br>(with-current-buffer =
(get-buffer-create &quot;test&quot;)<br>=C2=A0 (setq left-margin-width 5)<b=
r>=C2=A0 (insert-sliced-image (svg-image (let* ((ph (line-pixel-height))<br=
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s=
ize (* 2 ph))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0(svg (svg-create size size)))<br>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (svg-circle svg ph ph ph :fill &quot;red&quot;)=
<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 svg))<br>=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ni=
l<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0&#39;left-margin<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A02)<br>=C2=A0 (switch-to-buffer (cu=
rrent-buffer)))<br><br>when instead of &#39;left-margin&#39;, nil is passed=
 as value (i.e. the text is<br>inserted in the text area), then everything =
looks fine.<br><br>In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+=
 Version 3.24.31, cairo version 1.17.4)<br>=C2=A0of 2022-01-29 built on fed=
ora<br>Repository revision: 96533c18b7f9d75dce9e6bb534a16ed4ccf44ad1<br>Rep=
ository branch: master<br>Windowing system distributor &#39;The X.Org Found=
ation&#39;, version 11.0.12014000<br>System Description: Fedora Linux 35 (W=
orkstation Edition)<br><br>Configured using:<br>=C2=A0&#39;configure --with=
-modules --with-cairo --with-native-compilation<br>=C2=A0--with-json&#39;<b=
r><br>Configured features:<br>ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS G=
SETTINGS HARFBUZZ JPEG JSON<br>LIBSELINUX LIBXML2 MODULES NATIVE_COMP NOTIF=
Y INOTIFY PDUMPER PNG RSVG<br>SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SC=
ROLL_BARS X11 XDBE XIM XPM<br>GTK3 ZLIB<br><br>Important settings:<br>=C2=
=A0 value of $LANG: en_US.UTF-8<br>=C2=A0 value of $XMODIFIERS: @im=3Dibus<=
br>=C2=A0 locale-coding-system: utf-8-unix<br><br>Major mode: Lisp Interact=
ion<br><br>Minor modes in effect:<br>=C2=A0 marginalia-mode: t<br>=C2=A0 sa=
vehist-mode: t<br>=C2=A0 vertico-mode: t<br>=C2=A0 global-evil-surround-mod=
e: t<br>=C2=A0 evil-surround-mode: t<br>=C2=A0 recentf-mode: t<br>=C2=A0 sh=
ell-dirtrack-mode: t<br>=C2=A0 evil-mode: t<br>=C2=A0 evil-local-mode: t<br=
>=C2=A0 windmove-mode: t<br>=C2=A0 global-undo-tree-mode: t<br>=C2=A0 undo-=
tree-mode: t<br>=C2=A0 override-global-mode: t<br>=C2=A0 tooltip-mode: t<br=
>=C2=A0 global-eldoc-mode: t<br>=C2=A0 eldoc-mode: t<br>=C2=A0 show-paren-m=
ode: t<br>=C2=A0 electric-indent-mode: t<br>=C2=A0 mouse-wheel-mode: t<br>=
=C2=A0 tool-bar-mode: t<br>=C2=A0 menu-bar-mode: t<br>=C2=A0 file-name-shad=
ow-mode: t<br>=C2=A0 global-font-lock-mode: t<br>=C2=A0 font-lock-mode: t<b=
r>=C2=A0 blink-cursor-mode: t<br>=C2=A0 auto-composition-mode: t<br>=C2=A0 =
auto-encryption-mode: t<br>=C2=A0 auto-compression-mode: t<br>=C2=A0 line-n=
umber-mode: t<br>=C2=A0 indent-tabs-mode: t<br>=C2=A0 transient-mark-mode: =
t<br><br>Load-path shadows:<br>None found.<br><br>Features:<br>(shadow sort=
 mail-extr emacsbug message yank-media rmc dired<br>dired-loaddefs rfc822 m=
ml mml-sec epa epg rfc6068 epg-config gnus-util<br>time-date mm-decode mm-b=
odies mm-encode mail-parse rfc2231 mailabbrev<br>gmm-utils mailheader sendm=
ail rfc2047 rfc2045 ietf-drums mm-util<br>mail-prsvr mule-util cursor-senso=
r format-all language-id inheritenv<br>gitter derived pcase let-alist posfr=
ame transient format-spec request<br>autorevert filenotify mail-utils notif=
ications dbus avy<br>shr-tag-pre-highlight language-detection shr text-prop=
erty-search<br>pixel-fill kinsoku puny svg xml ewoc marginalia savehist ord=
erless<br>vertico evil-surround evil-nerd-commenter evil-nerd-commenter-ope=
rator<br>evil-nerd-commenter-sdk sgml-mode facemenu dom which-key bind-map<=
br>recentf tree-widget wid-edit evil evil-keybindings evil-integration<br>e=
vil-maps evil-commands reveal flyspell ispell evil-jumps<br>evil-command-wi=
ndow evil-types evil-search evil-ex shell pcomplete<br>comint ansi-color ev=
il-macros evil-repeat evil-states evil-core comp<br>comp-cstr warnings rx a=
dvice evil-common windmove thingatpt rect<br>evil-digraphs evil-vars ring e=
dmacro kmacro undo-tree diff cl-extra<br>help-mode use-package use-package-=
ensure use-package-delight<br>use-package-diminish use-package-bind-key bin=
d-key easy-mmode<br>use-package-core finder-inf info package browse-url url=
 url-proxy<br>url-privacy url-expand url-methods url-history url-cookie url=
-domsuf<br>url-util mailcap url-handlers url-parse auth-source cl-seq eieio=
<br>eieio-core cl-macs eieio-loaddefs password-cache json map url-vars seq<=
br>gv subr-x byte-opt bytecomp byte-compile cconv cl-loaddefs cl-lib<br>che=
macs iso-transl tooltip eldoc paren electric uniquify ediff-hook<br>vc-hook=
s lisp-float-type elisp-mode mwheel term/x-win x-win<br>term/common-win x-d=
nd tool-bar dnd fontset image regexp-opt fringe<br>tabulated-list replace n=
ewcomment text-mode lisp-mode prog-mode register<br>page tab-bar menu-bar r=
fn-eshadow isearch easymenu timer select<br>scroll-bar mouse jit-lock font-=
lock syntax font-core term/tty-colors<br>frame minibuffer cl-generic cham g=
eorgian utf-8-lang misc-lang<br>vietnamese tibetan thai tai-viet lao korean=
 japanese eucjp-ms cp51932<br>hebrew greek romanian slovak czech european e=
thiopic indian cyrillic<br>chinese composite emoji-zwj charscript charprop =
case-table epa-hook<br>jka-cmpr-hook help simple abbrev obarray cl-preloade=
d nadvice button<br>loaddefs faces cus-face macroexp files window text-prop=
erties overlay<br>sha1 md5 base64 format env code-pages mule custom widget =
keymap<br>hashtable-print-readable backquote threads dbusbind inotify<br>dy=
namic-setting system-font-setting font-render-setting cairo<br>move-toolbar=
 gtk x-toolkit x multi-tty make-network-process<br>native-compile emacs)<br=
><br>Memory information:<br>((conses 16 350688 17872)<br>=C2=A0(symbols 48 =
22237 1)<br>=C2=A0(strings 32 115274 5006)<br>=C2=A0(string-bytes 1 3507701=
)<br>=C2=A0(vectors 16 225348)<br>=C2=A0(vector-slots 8 1419197 79043)<br>=
=C2=A0(floats 8 90951 50)<br>=C2=A0(intervals 56 651 0)<br>=C2=A0(buffers 9=
92 13))<br></div>

--00000000000085f70e05dbba6d93--




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: dalanicolai <dalanicolai@HIDDEN>
Subject: bug#54688: Acknowledgement (29.0.50; Sliced image in margin looks
 bad)
Message-ID: <handler.54688.B.164896897827834.ack <at> debbugs.gnu.org>
References: <CACJP=3=U8oFrS8Gk8+nfCNrm+Avp_irXnrwZix5gra6Xn=3j+A@HIDDEN>
X-Gnu-PR-Message: ack 54688
X-Gnu-PR-Package: emacs
Reply-To: 54688 <at> debbugs.gnu.org
Date: Sun, 03 Apr 2022 06:57:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 54688 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
54688: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D54688
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#54688: 29.0.50; Sliced image in margin looks bad
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 03 Apr 2022 08:58:02 +0000
Resent-Message-ID: <handler.54688.B54688.16489762336598 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 54688
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: dalanicolai <dalanicolai@HIDDEN>
Cc: 54688 <at> debbugs.gnu.org
Received: via spool by 54688-submit <at> debbugs.gnu.org id=B54688.16489762336598
          (code B ref 54688); Sun, 03 Apr 2022 08:58:02 +0000
Received: (at 54688) by debbugs.gnu.org; 3 Apr 2022 08:57:13 +0000
Received: from localhost ([127.0.0.1]:47576 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1naw2r-0001iK-Ba
	for submit <at> debbugs.gnu.org; Sun, 03 Apr 2022 04:57:13 -0400
Received: from eggs.gnu.org ([209.51.188.92]:41546)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1naw2p-0001i7-IR
 for 54688 <at> debbugs.gnu.org; Sun, 03 Apr 2022 04:57:12 -0400
Received: from [2001:470:142:3::e] (port=33534 helo=fencepost.gnu.org)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1naw2k-0002KW-41; Sun, 03 Apr 2022 04:57:06 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=posgE5hriK4D5l+USLHsXuQZKvRxSgpoBl9AKdWrJRU=; b=GOoHifArm4J6
 z0SYnIBjHX+aB7qmNHN6LaQbZPo0CuaMCQGQgKLLeDC0E3IoxTXmFzpFZyojmL9K1t7C7JB/g8VR1
 IFiSPvs8ZTnZHXdiKomtRPVnpRqD+N64T/AKiE5gxb8WpEAIwgsmPFKu2O9hjc5InjDkTA6Rs5ZZi
 xcEc4BQXMB/6Ew3xtc7ScKZBvcTAdETJnzxxLR2B1Ads97RTOtVy3IXHQNl3KZF8q1Vg+YDJgC+xR
 tlc+wFi6/XqjcFsXaSVDfKpi5T4ZGVGPHJK2Dss+VOrjR8mnXxB5sjzJy+XyT58/CZgn2N6qLbswb
 bNQ0MNiFGxTd/0YHSDOo3A==;
Received: from [87.69.77.57] (port=1563 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1naw2j-0004Js-Kl; Sun, 03 Apr 2022 04:57:05 -0400
Date: Sun, 03 Apr 2022 11:57:04 +0300
Message-Id: <83zgl235pb.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <CACJP=3=U8oFrS8Gk8+nfCNrm+Avp_irXnrwZix5gra6Xn=3j+A@HIDDEN>
 (message from dalanicolai on Sun, 3 Apr 2022 08:50:20 +0200)
References: <CACJP=3=U8oFrS8Gk8+nfCNrm+Avp_irXnrwZix5gra6Xn=3j+A@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: dalanicolai <dalanicolai@HIDDEN>
> Date: Sun, 3 Apr 2022 08:50:20 +0200
> 
> Passing 'left-margin' for the AREA parameter in `insert-sliced-image`
> results in bad looking image. To reproduce from `emacs -q` evaluate the
> following code example:
> 
> (with-current-buffer (get-buffer-create "test")
>   (setq left-margin-width 5)
>   (insert-sliced-image (svg-image (let* ((ph (line-pixel-height))
>                                          (size (* 2 ph))
>                                          (svg (svg-create size size)))
>                                     (svg-circle svg ph ph ph :fill "red")
>                                     svg))
>                        nil
>                        'left-margin
>                        2)
>   (switch-to-buffer (current-buffer)))
> 
> when instead of 'left-margin', nil is passed as value (i.e. the text is
> inserted in the text area), then everything looks fine.

"Everything looks fine" until you insert some text after the 2 slices
of the image.  That is, after evaluating the form with left-margin
replaced by nil, do this:

  C-u 2 M-g c  ;; go to buffer position 2
  x            ;; insert a character
  C-n          ;; go to next line
  x            ;; insert another character

The problem is that your images are smaller than the default height of
the screen line, as determined by the 'default' face.  So slices of
the image do not produce a single circle, but two semi-circles with
empty space between them.

If this is the problem, then I see nothing wrong with this: to have
the two slices come together, you need to fit the size of the image to
the height of the default face.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#54688: 29.0.50; Sliced image in margin looks bad
Resent-From: dalanicolai <dalanicolai@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 03 Apr 2022 10:34:01 +0000
Resent-Message-ID: <handler.54688.B54688.164898200115918 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 54688
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 54688 <at> debbugs.gnu.org
Received: via spool by 54688-submit <at> debbugs.gnu.org id=B54688.164898200115918
          (code B ref 54688); Sun, 03 Apr 2022 10:34:01 +0000
Received: (at 54688) by debbugs.gnu.org; 3 Apr 2022 10:33:21 +0000
Received: from localhost ([127.0.0.1]:47641 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1naxXs-00048f-Nk
	for submit <at> debbugs.gnu.org; Sun, 03 Apr 2022 06:33:21 -0400
Received: from mail-yb1-f182.google.com ([209.85.219.182]:35630)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dalanicolai@HIDDEN>) id 1naxXq-00048S-KX
 for 54688 <at> debbugs.gnu.org; Sun, 03 Apr 2022 06:33:19 -0400
Received: by mail-yb1-f182.google.com with SMTP id o5so12701672ybe.2
 for <54688 <at> debbugs.gnu.org>; Sun, 03 Apr 2022 03:33:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=vuyiyXjiBpNJkJIGThfkbDbM56fwL77hF9KHKNTveg0=;
 b=KtK1lYPp2l4UbCZ5KljGDkTBNXcGa4Fi2JUH/FpP026wyHrXDkbJzeBNCpXPNsonDQ
 HNqWNMP4IBhsGls1c7pK9thEl6EHQ1dFt6iBu7OsR6LrAVWoLC4Pr05MDNbsGPUIF4jO
 9Ol2y7LAeLCptvzjjas+SBZVNBQGs5lqb488TmonRLD4k/VDWsf2dm+aWqsDr5eTZHg/
 5nisXEsnWt8cVOJb4e3DpYpxW+W0zJeBeL1xwiUv9D2LbqHd14ajKNp5/gzqaIDmDogz
 GWdobXtlrpfHMS6Y2l1RHCB0gl+wJDgLPeYjsqPOmVfB0A8n+89lIZEIo2CHF0Ajq+vM
 aKAw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=vuyiyXjiBpNJkJIGThfkbDbM56fwL77hF9KHKNTveg0=;
 b=jIFW6g4hKXcBCx9DWeZM0EP8J/AHyPrf1mwehIFaXBufgBIMnhn07UTBomJZBTy8yX
 pzF6PI8Xwc8o+ilvG4wg5WuWHwOCY0SDH5tOt0IW6Xe2HwdEZEUVB0FeTyPTNgJRLImu
 HIAq6JSJTZUFJB3FHE5tINc9dU9SuF7yJFCkHhIuP8X1MsSwdQ+UAuzXV4WVi6MpAggz
 Em6lf0xeGr1jiAT6Gqp+Vjfno7rGAKuj9HQcaVCJeRTlAWa2jhDUmte/PB2mUsNa6fTF
 Ru3Qv0CQdPKETt5+pox80AnNw1gOc0Oj06Ab4OsF1B/gdQKFmC3xMU5ec2AHBP7YOj6U
 U7WA==
X-Gm-Message-State: AOAM533skHD+CQvbtg/GPf1NLJzO1m/MEtIlMO+Q/6J58u9h1fDnNk3l
 0h/ORqEVhufKFHB4kuhtQsqRiW5rggfl/f23FYE=
X-Google-Smtp-Source: ABdhPJyRtLg4k0ED5DaYtEXZH9RbRH8L+MjYgmMQcgdTXSYhd3ZqwS1GWBJavmOilc7Usrqy+xnYoiSuPlLo5DjcOsQ=
X-Received: by 2002:a25:2fcf:0:b0:63d:9aa5:934c with SMTP id
 v198-20020a252fcf000000b0063d9aa5934cmr4689379ybv.488.1648981993053; Sun, 03
 Apr 2022 03:33:13 -0700 (PDT)
MIME-Version: 1.0
References: <CACJP=3=U8oFrS8Gk8+nfCNrm+Avp_irXnrwZix5gra6Xn=3j+A@HIDDEN>
 <83zgl235pb.fsf@HIDDEN>
In-Reply-To: <83zgl235pb.fsf@HIDDEN>
From: dalanicolai <dalanicolai@HIDDEN>
Date: Sun, 3 Apr 2022 12:33:01 +0200
Message-ID: <CACJP=3kEBQ-V=ZmjyUkaTzc8B4X=3ab7DnTD6CUij6NtG5O01A@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000efdff505dbbd899b"
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000efdff505dbbd899b
Content-Type: text/plain; charset="UTF-8"

Thank you for the quick reply. However, the height of the image,
(* 2 (line-pixel-height)), is equal to twice the `default-font-height`
(the 'line-pixel-height' and 'default-font-height' are equal, here both
17).

So before I add the character after the image, (line-pixel-height)
returns 17. But when I insert a character after it (with
'default-font-height' is 17), the `line-pixel-height` increases to
22. So I am not sure how to not let the line height increase.
I will try to play a little with the :ascent value.

On Sun, 3 Apr 2022 at 10:57, Eli Zaretskii <eliz@HIDDEN> wrote:

> > From: dalanicolai <dalanicolai@HIDDEN>
> > Date: Sun, 3 Apr 2022 08:50:20 +0200
> >
> > Passing 'left-margin' for the AREA parameter in `insert-sliced-image`
> > results in bad looking image. To reproduce from `emacs -q` evaluate the
> > following code example:
> >
> > (with-current-buffer (get-buffer-create "test")
> >   (setq left-margin-width 5)
> >   (insert-sliced-image (svg-image (let* ((ph (line-pixel-height))
> >                                          (size (* 2 ph))
> >                                          (svg (svg-create size size)))
> >                                     (svg-circle svg ph ph ph :fill "red")
> >                                     svg))
> >                        nil
> >                        'left-margin
> >                        2)
> >   (switch-to-buffer (current-buffer)))
> >
> > when instead of 'left-margin', nil is passed as value (i.e. the text is
> > inserted in the text area), then everything looks fine.
>
> "Everything looks fine" until you insert some text after the 2 slices
> of the image.  That is, after evaluating the form with left-margin
> replaced by nil, do this:
>
>   C-u 2 M-g c  ;; go to buffer position 2
>   x            ;; insert a character
>   C-n          ;; go to next line
>   x            ;; insert another character
>
> The problem is that your images are smaller than the default height of
> the screen line, as determined by the 'default' face.  So slices of
> the image do not produce a single circle, but two semi-circles with
> empty space between them.
>
> If this is the problem, then I see nothing wrong with this: to have
> the two slices come together, you need to fit the size of the image to
> the height of the default face.
>

--000000000000efdff505dbbd899b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Thank you for the quick reply. However, the height of=
 the image,</div><div>(* 2 (line-pixel-height)), is equal to twice the `def=
ault-font-height`</div><div>(the &#39;line-pixel-height&#39; and &#39;defau=
lt-font-height&#39; are equal, here both</div><div>17).</div><div><br></div=
><div>So before I add the character after the image, (line-pixel-height)</d=
iv><div>returns 17. But when I insert a character after it (with</div><div>=
&#39;default-font-height&#39; is 17), the `line-pixel-height` increases to<=
/div><div>22. So I am not sure how to not let the line height increase.</di=
v><div>I will try to play a little with the :ascent value.<br></div></div><=
br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sun,=
 3 Apr 2022 at 10:57, Eli Zaretskii &lt;<a href=3D"mailto:eliz@HIDDEN">eli=
z@HIDDEN</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding=
-left:1ex">&gt; From: dalanicolai &lt;<a href=3D"mailto:dalanicolai@HIDDEN=
om" target=3D"_blank">dalanicolai@HIDDEN</a>&gt;<br>
&gt; Date: Sun, 3 Apr 2022 08:50:20 +0200<br>
&gt; <br>
&gt; Passing &#39;left-margin&#39; for the AREA parameter in `insert-sliced=
-image`<br>
&gt; results in bad looking image. To reproduce from `emacs -q` evaluate th=
e<br>
&gt; following code example:<br>
&gt; <br>
&gt; (with-current-buffer (get-buffer-create &quot;test&quot;)<br>
&gt;=C2=A0 =C2=A0(setq left-margin-width 5)<br>
&gt;=C2=A0 =C2=A0(insert-sliced-image (svg-image (let* ((ph (line-pixel-hei=
ght))<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 (size (* 2 ph))<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 (svg (svg-create size size)))<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(svg-circle s=
vg ph ph ph :fill &quot;red&quot;)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0svg))<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 nil<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 &#39;left-margin<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 2)<br>
&gt;=C2=A0 =C2=A0(switch-to-buffer (current-buffer)))<br>
&gt; <br>
&gt; when instead of &#39;left-margin&#39;, nil is passed as value (i.e. th=
e text is<br>
&gt; inserted in the text area), then everything looks fine.<br>
<br>
&quot;Everything looks fine&quot; until you insert some text after the 2 sl=
ices<br>
of the image.=C2=A0 That is, after evaluating the form with left-margin<br>
replaced by nil, do this:<br>
<br>
=C2=A0 C-u 2 M-g c=C2=A0 ;; go to buffer position 2<br>
=C2=A0 x=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; insert a character<br>
=C2=A0 C-n=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; go to next line<br>
=C2=A0 x=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; insert another charact=
er<br>
<br>
The problem is that your images are smaller than the default height of<br>
the screen line, as determined by the &#39;default&#39; face.=C2=A0 So slic=
es of<br>
the image do not produce a single circle, but two semi-circles with<br>
empty space between them.<br>
<br>
If this is the problem, then I see nothing wrong with this: to have<br>
the two slices come together, you need to fit the size of the image to<br>
the height of the default face.<br>
</blockquote></div>

--000000000000efdff505dbbd899b--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#54688: 29.0.50; Sliced image in margin looks bad
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 03 Apr 2022 10:55:02 +0000
Resent-Message-ID: <handler.54688.B54688.164898325418101 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 54688
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: dalanicolai <dalanicolai@HIDDEN>
Cc: 54688 <at> debbugs.gnu.org
Received: via spool by 54688-submit <at> debbugs.gnu.org id=B54688.164898325418101
          (code B ref 54688); Sun, 03 Apr 2022 10:55:02 +0000
Received: (at 54688) by debbugs.gnu.org; 3 Apr 2022 10:54:14 +0000
Received: from localhost ([127.0.0.1]:47703 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1naxs6-0004ht-EL
	for submit <at> debbugs.gnu.org; Sun, 03 Apr 2022 06:54:14 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53852)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1naxs3-0004hg-Qu
 for 54688 <at> debbugs.gnu.org; Sun, 03 Apr 2022 06:54:12 -0400
Received: from [2001:470:142:3::e] (port=34408 helo=fencepost.gnu.org)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1naxry-0000XH-Hz; Sun, 03 Apr 2022 06:54:06 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=aMb8MiYuL1yiSeXIUTdv9JfkqHnpz9nt/a0D8EeleXw=; b=bsCAE2LXspM2
 +gsDPgbq417gt7eymUlAz5zhBWx8J3P4wz+sMapyMlWhNLsHvmrqfpEpeO1oJzP6oxLwk1CCJjDWG
 mrgJFAaNqZEuFGkBEO3Bc+G55Ok7xBw/d5QDcQzCBBS0rorYBninavH87XdCI+J6SLQbjLEY2qXEa
 xLOmlnG6p2Yz5sr8O08n2ys/LHsWEmi5S6e3+yhsYFzSBNdSlhV2ZvATM1Wc1rUfCUBYWdxzHAGpA
 Z52X2PC6MtBEguhaHYGD/vQDuGJpxQ7bhcxm/b0eexOLLUxTJR8rQz53YRH07zVZJtmsy/tPRWd30
 Z1cH736TB9REgb+jre02tw==;
Received: from [87.69.77.57] (port=4890 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1naxrx-0000PU-U2; Sun, 03 Apr 2022 06:54:06 -0400
Date: Sun, 03 Apr 2022 13:54:05 +0300
Message-Id: <83v8vq30aa.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <CACJP=3kEBQ-V=ZmjyUkaTzc8B4X=3ab7DnTD6CUij6NtG5O01A@HIDDEN>
 (message from dalanicolai on Sun, 3 Apr 2022 12:33:01 +0200)
References: <CACJP=3=U8oFrS8Gk8+nfCNrm+Avp_irXnrwZix5gra6Xn=3j+A@HIDDEN>
 <83zgl235pb.fsf@HIDDEN>
 <CACJP=3kEBQ-V=ZmjyUkaTzc8B4X=3ab7DnTD6CUij6NtG5O01A@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: dalanicolai <dalanicolai@HIDDEN>
> Date: Sun, 3 Apr 2022 12:33:01 +0200
> Cc: 54688 <at> debbugs.gnu.org
> 
> Thank you for the quick reply. However, the height of the image,
> (* 2 (line-pixel-height)), is equal to twice the `default-font-height`
> (the 'line-pixel-height' and 'default-font-height' are equal, here both
> 17).
> 
> So before I add the character after the image, (line-pixel-height)
> returns 17. But when I insert a character after it (with
> 'default-font-height' is 17), the `line-pixel-height` increases to
> 22. So I am not sure how to not let the line height increase.
> I will try to play a little with the :ascent value.

Images can also have margins:

  int
  image_ascent (struct image *img, struct face *face, struct glyph_slice *slice)
  {
    int height;
    int ascent;

    if (slice->height == img->height)
      height = img->height + img->vmargin;
    else if (slice->y == 0)
      height = slice->height + img->vmargin;
    else
      height = slice->height;

Maybe those make the difference?

In any case, once I add a character, the line height grows, which
tells us some vertical dimension somewhere is unaccounted for.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#54688: 29.0.50; Sliced image in margin looks bad
Resent-From: dalanicolai <dalanicolai@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 03 Apr 2022 11:04:01 +0000
Resent-Message-ID: <handler.54688.B54688.164898382518986 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 54688
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 54688 <at> debbugs.gnu.org
Received: via spool by 54688-submit <at> debbugs.gnu.org id=B54688.164898382518986
          (code B ref 54688); Sun, 03 Apr 2022 11:04:01 +0000
Received: (at 54688) by debbugs.gnu.org; 3 Apr 2022 11:03:45 +0000
Received: from localhost ([127.0.0.1]:47707 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nay1J-0004wA-CA
	for submit <at> debbugs.gnu.org; Sun, 03 Apr 2022 07:03:45 -0400
Received: from mail-yw1-f182.google.com ([209.85.128.182]:36079)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dalanicolai@HIDDEN>) id 1nay1I-0004vx-8Y
 for 54688 <at> debbugs.gnu.org; Sun, 03 Apr 2022 07:03:44 -0400
Received: by mail-yw1-f182.google.com with SMTP id
 00721157ae682-2e64a6b20eeso72732167b3.3
 for <54688 <at> debbugs.gnu.org>; Sun, 03 Apr 2022 04:03:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=pqHlMdodUvh8CL68uVDQyh2MrauI9bFMjf91D8Gk0Gk=;
 b=HTlSPl2P+1a2dUdBw4LlC4HNTsrbBH8Xru8b3mdWCWgsKakfYiNkbTjIsfSJRfNf8I
 z4mrsLgfmSyof1wP6rKxjaYzqEMwRG0mVmmH4bUrBrWUo6U+SHVw1pBE9JoAk1S+2xtB
 mLIZzGyp+PzRjmlZ4zJcoxykYXvO0c2c9E35IVqcdAGBTfQycylTRn6L88CBszx40ApY
 AH8AtdEHdv2Ju2Rh62jBUOhPUATbcYC3vwJwOET+4CbgWhWy0lk8Nmp45jA/fKR5x9oi
 7EgxqryA1sOvAX2HamuO2pBhwD5D3/A9e7Sz+TvbAW/eHRkG4nwdOniv7bc6lfHD5V8z
 vN3Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=pqHlMdodUvh8CL68uVDQyh2MrauI9bFMjf91D8Gk0Gk=;
 b=x5urH79F7VJSXr2M6GyIUKb1wiEm3znOO4YtgCxGYMJg+D86wX/gwkscann+2fLq1W
 uV0CTOMRFBEjx6vuhs3Wkm2hG9DwmnD1QE6MP+46FcF8P2sgEiyIeuH1lxLWkZyIiRGD
 mZZZZVldA/8I73okQtl5ySp76MtGJHoHoXvlyy/xq9i2Td1oydVHqBbMNUYOB2N1iSar
 aLqYs52WDI13rKDbpG9EdHbS6hk31O9+fRJRyTBoVCKysaf1OWkP7wduaAU4aVU1lOUn
 aIPvhXda9TQCBtQtl1ZlgsWODV5GX+0iDbkxeIlMLe9kWQsZrOKIUlqvMQUehnTlNCeC
 MmVg==
X-Gm-Message-State: AOAM533Az8i6QV2enzY1kd5pUlZRYY2wRgqZQBu3cbuEDHYJKWHtbZ+X
 75b3C4elWEFSziAhi/dERgJN09Vb1pjuFY3Kiz1ZpRZhgSHQFw==
X-Google-Smtp-Source: ABdhPJxtOaGJI6FFCAOt7RxhffjVThIpcacp2se5UrdtamBx/MSWpm0m4afHrpNfUZkC7zHPVpKmKzJeqzIjDh3/rZg=
X-Received: by 2002:a0d:d792:0:b0:2e5:ca8b:d877 with SMTP id
 z140-20020a0dd792000000b002e5ca8bd877mr17609468ywd.264.1648983818690; Sun, 03
 Apr 2022 04:03:38 -0700 (PDT)
MIME-Version: 1.0
References: <CACJP=3=U8oFrS8Gk8+nfCNrm+Avp_irXnrwZix5gra6Xn=3j+A@HIDDEN>
 <83zgl235pb.fsf@HIDDEN>
 <CACJP=3kEBQ-V=ZmjyUkaTzc8B4X=3ab7DnTD6CUij6NtG5O01A@HIDDEN>
 <83v8vq30aa.fsf@HIDDEN>
In-Reply-To: <83v8vq30aa.fsf@HIDDEN>
From: dalanicolai <dalanicolai@HIDDEN>
Date: Sun, 3 Apr 2022 13:03:27 +0200
Message-ID: <CACJP=3nMwwxjjhC1WCuqeXLVAR7c9=0ntqm-uRfAw5+CL_TzjQ@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000c0e26305dbbdf61e"
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000c0e26305dbbdf61e
Content-Type: text/plain; charset="UTF-8"

(Once more using reply-all)

Playing around with :ascent, makes possible to keep the line-pixel-height
fixed.

So in the following I simply use `insert-image`. Without the :ascent, the
'line-pixel-height' increases when inserting another character. With the
:ascent it is possible to reduce this 'increase'. For me the increase is 0
when I use an ascent value of 80.
(below the used code)

(with-current-buffer (get-buffer-create "test")
  (setq left-margin-width 5)
  (insert-image (svg-image (let* ((ph (line-pixel-height))
                                  (size ph)
                                  (svg (svg-create size size)))
                             (svg-circle svg ph ph ph :fill "red")
                             svg)
                           :ascent 80))
  (switch-to-buffer (current-buffer)))

On Sun, 3 Apr 2022 at 12:54, Eli Zaretskii <eliz@HIDDEN> wrote:

> > From: dalanicolai <dalanicolai@HIDDEN>
> > Date: Sun, 3 Apr 2022 12:33:01 +0200
> > Cc: 54688 <at> debbugs.gnu.org
> >
> > Thank you for the quick reply. However, the height of the image,
> > (* 2 (line-pixel-height)), is equal to twice the `default-font-height`
> > (the 'line-pixel-height' and 'default-font-height' are equal, here both
> > 17).
> >
> > So before I add the character after the image, (line-pixel-height)
> > returns 17. But when I insert a character after it (with
> > 'default-font-height' is 17), the `line-pixel-height` increases to
> > 22. So I am not sure how to not let the line height increase.
> > I will try to play a little with the :ascent value.
>
> Images can also have margins:
>
>   int
>   image_ascent (struct image *img, struct face *face, struct glyph_slice
> *slice)
>   {
>     int height;
>     int ascent;
>
>     if (slice->height == img->height)
>       height = img->height + img->vmargin;
>     else if (slice->y == 0)
>       height = slice->height + img->vmargin;
>     else
>       height = slice->height;
>
> Maybe those make the difference?
>
> In any case, once I add a character, the line height grows, which
> tells us some vertical dimension somewhere is unaccounted for.
>

--000000000000c0e26305dbbdf61e
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>(Once more using reply-all)</div><div><br></div><div>=
<div>Playing around with :ascent, makes possible to keep the line-pixel-hei=
ght fixed.</div><div><br></div><div>So in the following I simply use `inser=
t-image`. Without the :ascent, the</div><div>&#39;line-pixel-height&#39; in=
creases when inserting another character. With the</div><div>:ascent it is =
possible to reduce this &#39;increase&#39;. For me the increase is 0</div><=
div>when I use an ascent value of 80.</div><div>(below the used code)</div>=
<div><br></div><div><span class=3D"gmail-im">(with-current-buffer (get-buff=
er-create &quot;test&quot;)<br>=C2=A0 (setq left-margin-width 5)<br></span>=
=C2=A0 (insert-image (svg-image (let* ((ph (line-pixel-height))<br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (size ph)<span class=3D"gmail-im"><b=
r>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (svg (svg-create size size)))=
<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(svg-circle svg ph ph ph :fill &quot;red&=
quot;)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0svg)<br></span>=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0:ascent 80))<br>=C2=A0 (switch-to-buffer (current-buffer)))</div></di=
v></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr=
">On Sun, 3 Apr 2022 at 12:54, Eli Zaretskii &lt;<a href=3D"mailto:eliz@gnu=
.org">eliz@HIDDEN</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote=
" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);=
padding-left:1ex">&gt; From: dalanicolai &lt;<a href=3D"mailto:dalanicolai@=
gmail.com" target=3D"_blank">dalanicolai@HIDDEN</a>&gt;<br>
&gt; Date: Sun, 3 Apr 2022 12:33:01 +0200<br>
&gt; Cc: <a href=3D"mailto:54688 <at> debbugs.gnu.org" target=3D"_blank">54688@d=
ebbugs.gnu.org</a><br>
&gt; <br>
&gt; Thank you for the quick reply. However, the height of the image,<br>
&gt; (* 2 (line-pixel-height)), is equal to twice the `default-font-height`=
<br>
&gt; (the &#39;line-pixel-height&#39; and &#39;default-font-height&#39; are=
 equal, here both<br>
&gt; 17).<br>
&gt; <br>
&gt; So before I add the character after the image, (line-pixel-height)<br>
&gt; returns 17. But when I insert a character after it (with<br>
&gt; &#39;default-font-height&#39; is 17), the `line-pixel-height` increase=
s to<br>
&gt; 22. So I am not sure how to not let the line height increase.<br>
&gt; I will try to play a little with the :ascent value.<br>
<br>
Images can also have margins:<br>
<br>
=C2=A0 int<br>
=C2=A0 image_ascent (struct image *img, struct face *face, struct glyph_sli=
ce *slice)<br>
=C2=A0 {<br>
=C2=A0 =C2=A0 int height;<br>
=C2=A0 =C2=A0 int ascent;<br>
<br>
=C2=A0 =C2=A0 if (slice-&gt;height =3D=3D img-&gt;height)<br>
=C2=A0 =C2=A0 =C2=A0 height =3D img-&gt;height + img-&gt;vmargin;<br>
=C2=A0 =C2=A0 else if (slice-&gt;y =3D=3D 0)<br>
=C2=A0 =C2=A0 =C2=A0 height =3D slice-&gt;height + img-&gt;vmargin;<br>
=C2=A0 =C2=A0 else<br>
=C2=A0 =C2=A0 =C2=A0 height =3D slice-&gt;height;<br>
<br>
Maybe those make the difference?<br>
<br>
In any case, once I add a character, the line height grows, which<br>
tells us some vertical dimension somewhere is unaccounted for.<br>
</blockquote></div>

--000000000000c0e26305dbbdf61e--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#54688: 29.0.50; Sliced image in margin looks bad
Resent-From: dalanicolai <dalanicolai@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 03 Apr 2022 11:06:02 +0000
Resent-Message-ID: <handler.54688.B54688.164898391419158 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 54688
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 54688 <at> debbugs.gnu.org
Received: via spool by 54688-submit <at> debbugs.gnu.org id=B54688.164898391419158
          (code B ref 54688); Sun, 03 Apr 2022 11:06:02 +0000
Received: (at 54688) by debbugs.gnu.org; 3 Apr 2022 11:05:14 +0000
Received: from localhost ([127.0.0.1]:47717 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nay2j-0004yv-MP
	for submit <at> debbugs.gnu.org; Sun, 03 Apr 2022 07:05:14 -0400
Received: from mail-yb1-f182.google.com ([209.85.219.182]:44804)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dalanicolai@HIDDEN>) id 1nay2i-0004yg-Ef
 for 54688 <at> debbugs.gnu.org; Sun, 03 Apr 2022 07:05:13 -0400
Received: by mail-yb1-f182.google.com with SMTP id x131so212302ybe.11
 for <54688 <at> debbugs.gnu.org>; Sun, 03 Apr 2022 04:05:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=MbhmdAQruwMk7Da9Z3zjgIvymhb8+kJbAzC9mDayvdo=;
 b=VLYQXuY8Ff3xqluKM9L2IbGi12Pe+ljcU1ub3xvA6nrxma8BlGvvgMmRWf3ZiS0WsJ
 600fihwtrJtALXf8REN4RmY34hBqK3mPHoCSnoyyPHBXZovHi9PG3imL+ClJHHoatb3h
 EUhXL3Zf07EOfXX7KGbVA7a6rY000qnxmY3nQ4iRZtfuQEo7iYNY5iz6U46TUZWGUlF7
 l7+LnRWnv9eyh9f6A5PxncQ7vNNVccYoWqS59NwsraZ/GeUyJjByo4RCasjUHwXrnOja
 h3NZ6W97ODERe1mKl0sgY1ksLN/QBKau/cQFBNYzv5DstMXP5la1OEk9fcjVtZmr7WKW
 AEMA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=MbhmdAQruwMk7Da9Z3zjgIvymhb8+kJbAzC9mDayvdo=;
 b=kmR4IyWiXOeDx6/JjUA6B+Uo0yX2w0FOKiK8NAtoSJfrxwErCpG3uLITXPQ6kiR0Af
 lnmrMKWCLuWUbcmXX02eNLkmqftqtEn+cjNPdxqr5FgglNVNDHlnlhjSTnjA0izlUSIJ
 34Ndy148DFxuZZDrh0W91h50ptk94ImbL+4cHd+5NrP99Op2CNxnNPUD/1CaVhNC1uFQ
 +VMjPZ0fPpTg6rxS1HUtSgMexSxjWh2wEOIWnTP6PqL8IATCBp5O/8+oPwrbC/w9BOFS
 vfdQ0hI/+fIwwzk6yVkpXraoRPuJuSEkq1/IoeBEAuFhhB0HbAo7jgeiEZ5llQBaFZ5R
 tfAg==
X-Gm-Message-State: AOAM531L78Y4x+HZvkYCY2x21PlFP9xWPRzxBG7HnCMU6SFfIFhdlINy
 +kFKWIZGfB4eO7z/e6DpLMv+mB/1DTb1s1Spq4y5KhGIGSc=
X-Google-Smtp-Source: ABdhPJwb5gJHlAA1+o0HMiPuG+DjwzLGDcKJG3vUFQ0tu9HY6WLWe7XAbjEUSl+hRrOkbmG5CvgaV9GJe34Koot9aTs=
X-Received: by 2002:a25:3204:0:b0:63d:b2b3:ea7b with SMTP id
 y4-20020a253204000000b0063db2b3ea7bmr2457838yby.431.1648983906984; Sun, 03
 Apr 2022 04:05:06 -0700 (PDT)
MIME-Version: 1.0
References: <CACJP=3=U8oFrS8Gk8+nfCNrm+Avp_irXnrwZix5gra6Xn=3j+A@HIDDEN>
 <83zgl235pb.fsf@HIDDEN>
 <CACJP=3kEBQ-V=ZmjyUkaTzc8B4X=3ab7DnTD6CUij6NtG5O01A@HIDDEN>
 <83v8vq30aa.fsf@HIDDEN>
 <CACJP=3nMwwxjjhC1WCuqeXLVAR7c9=0ntqm-uRfAw5+CL_TzjQ@HIDDEN>
In-Reply-To: <CACJP=3nMwwxjjhC1WCuqeXLVAR7c9=0ntqm-uRfAw5+CL_TzjQ@HIDDEN>
From: dalanicolai <dalanicolai@HIDDEN>
Date: Sun, 3 Apr 2022 13:04:55 +0200
Message-ID: <CACJP=3kNWiqNcrLNfFQPGY5T06X-ON_Xx3VO2p+9Ua1LxMrR_g@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000000426ab05dbbdfc86"
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--0000000000000426ab05dbbdfc86
Content-Type: text/plain; charset="UTF-8"

I would think that this :ascent of 80, behaves how :ascent 50 (the default)
is supposed to behave?

On Sun, 3 Apr 2022 at 13:03, dalanicolai <dalanicolai@HIDDEN> wrote:

> (Once more using reply-all)
>
> Playing around with :ascent, makes possible to keep the line-pixel-height
> fixed.
>
> So in the following I simply use `insert-image`. Without the :ascent, the
> 'line-pixel-height' increases when inserting another character. With the
> :ascent it is possible to reduce this 'increase'. For me the increase is 0
> when I use an ascent value of 80.
> (below the used code)
>
> (with-current-buffer (get-buffer-create "test")
>   (setq left-margin-width 5)
>   (insert-image (svg-image (let* ((ph (line-pixel-height))
>                                   (size ph)
>                                   (svg (svg-create size size)))
>                              (svg-circle svg ph ph ph :fill "red")
>                              svg)
>                            :ascent 80))
>   (switch-to-buffer (current-buffer)))
>
> On Sun, 3 Apr 2022 at 12:54, Eli Zaretskii <eliz@HIDDEN> wrote:
>
>> > From: dalanicolai <dalanicolai@HIDDEN>
>> > Date: Sun, 3 Apr 2022 12:33:01 +0200
>> > Cc: 54688 <at> debbugs.gnu.org
>> >
>> > Thank you for the quick reply. However, the height of the image,
>> > (* 2 (line-pixel-height)), is equal to twice the `default-font-height`
>> > (the 'line-pixel-height' and 'default-font-height' are equal, here both
>> > 17).
>> >
>> > So before I add the character after the image, (line-pixel-height)
>> > returns 17. But when I insert a character after it (with
>> > 'default-font-height' is 17), the `line-pixel-height` increases to
>> > 22. So I am not sure how to not let the line height increase.
>> > I will try to play a little with the :ascent value.
>>
>> Images can also have margins:
>>
>>   int
>>   image_ascent (struct image *img, struct face *face, struct glyph_slice
>> *slice)
>>   {
>>     int height;
>>     int ascent;
>>
>>     if (slice->height == img->height)
>>       height = img->height + img->vmargin;
>>     else if (slice->y == 0)
>>       height = slice->height + img->vmargin;
>>     else
>>       height = slice->height;
>>
>> Maybe those make the difference?
>>
>> In any case, once I add a character, the line height grows, which
>> tells us some vertical dimension somewhere is unaccounted for.
>>
>

--0000000000000426ab05dbbdfc86
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>I would think that this :ascent of 80, behaves how :a=
scent 50 (the default)</div><div>is supposed to behave?<br></div></div><br>=
<div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, 3 =
Apr 2022 at 13:03, dalanicolai &lt;<a href=3D"mailto:dalanicolai@HIDDEN"=
>dalanicolai@HIDDEN</a>&gt; wrote:<br></div><blockquote class=3D"gmail_q=
uote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,2=
04);padding-left:1ex"><div dir=3D"ltr"><div>(Once more using reply-all)</di=
v><div><br></div><div><div>Playing around with :ascent, makes possible to k=
eep the line-pixel-height fixed.</div><div><br></div><div>So in the followi=
ng I simply use `insert-image`. Without the :ascent, the</div><div>&#39;lin=
e-pixel-height&#39; increases when inserting another character. With the</d=
iv><div>:ascent it is possible to reduce this &#39;increase&#39;. For me th=
e increase is 0</div><div>when I use an ascent value of 80.</div><div>(belo=
w the used code)</div><div><br></div><div><span>(with-current-buffer (get-b=
uffer-create &quot;test&quot;)<br>=C2=A0 (setq left-margin-width 5)<br></sp=
an>=C2=A0 (insert-image (svg-image (let* ((ph (line-pixel-height))<br>=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (size ph)<span><br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (svg (svg-create size size)))<br>=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0(svg-circle svg ph ph ph :fill &quot;red&quot;)<br>=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0svg)<br></span>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:ascent 8=
0))<br>=C2=A0 (switch-to-buffer (current-buffer)))</div></div></div><br><di=
v class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, 3 Apr=
 2022 at 12:54, Eli Zaretskii &lt;<a href=3D"mailto:eliz@HIDDEN" target=3D=
"_blank">eliz@HIDDEN</a>&gt; wrote:<br></div><blockquote class=3D"gmail_qu=
ote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,20=
4);padding-left:1ex">&gt; From: dalanicolai &lt;<a href=3D"mailto:dalanicol=
ai@HIDDEN" target=3D"_blank">dalanicolai@HIDDEN</a>&gt;<br>
&gt; Date: Sun, 3 Apr 2022 12:33:01 +0200<br>
&gt; Cc: <a href=3D"mailto:54688 <at> debbugs.gnu.org" target=3D"_blank">54688@d=
ebbugs.gnu.org</a><br>
&gt; <br>
&gt; Thank you for the quick reply. However, the height of the image,<br>
&gt; (* 2 (line-pixel-height)), is equal to twice the `default-font-height`=
<br>
&gt; (the &#39;line-pixel-height&#39; and &#39;default-font-height&#39; are=
 equal, here both<br>
&gt; 17).<br>
&gt; <br>
&gt; So before I add the character after the image, (line-pixel-height)<br>
&gt; returns 17. But when I insert a character after it (with<br>
&gt; &#39;default-font-height&#39; is 17), the `line-pixel-height` increase=
s to<br>
&gt; 22. So I am not sure how to not let the line height increase.<br>
&gt; I will try to play a little with the :ascent value.<br>
<br>
Images can also have margins:<br>
<br>
=C2=A0 int<br>
=C2=A0 image_ascent (struct image *img, struct face *face, struct glyph_sli=
ce *slice)<br>
=C2=A0 {<br>
=C2=A0 =C2=A0 int height;<br>
=C2=A0 =C2=A0 int ascent;<br>
<br>
=C2=A0 =C2=A0 if (slice-&gt;height =3D=3D img-&gt;height)<br>
=C2=A0 =C2=A0 =C2=A0 height =3D img-&gt;height + img-&gt;vmargin;<br>
=C2=A0 =C2=A0 else if (slice-&gt;y =3D=3D 0)<br>
=C2=A0 =C2=A0 =C2=A0 height =3D slice-&gt;height + img-&gt;vmargin;<br>
=C2=A0 =C2=A0 else<br>
=C2=A0 =C2=A0 =C2=A0 height =3D slice-&gt;height;<br>
<br>
Maybe those make the difference?<br>
<br>
In any case, once I add a character, the line height grows, which<br>
tells us some vertical dimension somewhere is unaccounted for.<br>
</blockquote></div>
</blockquote></div>

--0000000000000426ab05dbbdfc86--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#54688: 29.0.50; Sliced image in margin looks bad
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 03 Apr 2022 12:03:01 +0000
Resent-Message-ID: <handler.54688.B54688.1648987374856 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 54688
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: dalanicolai <dalanicolai@HIDDEN>
Cc: 54688 <at> debbugs.gnu.org
Received: via spool by 54688-submit <at> debbugs.gnu.org id=B54688.1648987374856
          (code B ref 54688); Sun, 03 Apr 2022 12:03:01 +0000
Received: (at 54688) by debbugs.gnu.org; 3 Apr 2022 12:02:54 +0000
Received: from localhost ([127.0.0.1]:47820 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1naywY-0000Dj-DX
	for submit <at> debbugs.gnu.org; Sun, 03 Apr 2022 08:02:54 -0400
Received: from eggs.gnu.org ([209.51.188.92]:33910)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1naywW-0000DX-BQ
 for 54688 <at> debbugs.gnu.org; Sun, 03 Apr 2022 08:02:52 -0400
Received: from [2001:470:142:3::e] (port=35090 helo=fencepost.gnu.org)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1naywR-00037M-3O; Sun, 03 Apr 2022 08:02:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=OfaEwgkoP3g3t9tZitACs+/Cp1jOeKuwk+FHr6tPdh4=; b=OkVjtgxyBV5o
 nJSnqesDIAvpguSlW8iDbiuQkLmNYeYLWZo4r+KUBMy2nZiTKhEhuI1jv10rtodxFXai26OmHhldU
 Zx1bYrcT7MsI1Nf8l2XyzhfUvSO8BH6wS/gjTVmGOrX5HNJS2uVa0WqMGSt9pzNVpzWAP90O/yXXQ
 SDrqW/abCSJX8A+jdvDBWWr7cm4yFK45scyh23rlY482hsNWavzswiFbSA/cQPV9zYDtkH2iH4E+M
 Z1f+A1tEtQg6GIQF+3FpMGfQX5HCM609wPPp6JUupZLqMpJAeebZLp5Gd81MJJpsVU8BTVVJ9lYYE
 qJDtY3coaABHDnNYgvIDSw==;
Received: from [87.69.77.57] (port=1199 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1naywQ-0000jU-Ku; Sun, 03 Apr 2022 08:02:46 -0400
Date: Sun, 03 Apr 2022 15:02:45 +0300
Message-Id: <83tuba2x3u.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <CACJP=3kNWiqNcrLNfFQPGY5T06X-ON_Xx3VO2p+9Ua1LxMrR_g@HIDDEN>
 (message from dalanicolai on Sun, 3 Apr 2022 13:04:55 +0200)
References: <CACJP=3=U8oFrS8Gk8+nfCNrm+Avp_irXnrwZix5gra6Xn=3j+A@HIDDEN>
 <83zgl235pb.fsf@HIDDEN>
 <CACJP=3kEBQ-V=ZmjyUkaTzc8B4X=3ab7DnTD6CUij6NtG5O01A@HIDDEN>
 <83v8vq30aa.fsf@HIDDEN>
 <CACJP=3nMwwxjjhC1WCuqeXLVAR7c9=0ntqm-uRfAw5+CL_TzjQ@HIDDEN>
 <CACJP=3kNWiqNcrLNfFQPGY5T06X-ON_Xx3VO2p+9Ua1LxMrR_g@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: dalanicolai <dalanicolai@HIDDEN>
> Date: Sun, 3 Apr 2022 13:04:55 +0200
> Cc: 54688 <at> debbugs.gnu.org
> 
> I would think that this :ascent of 80, behaves how :ascent 50 (the default)
> is supposed to behave?

I don't think I understand the question.

(Is it still relevant, given your followup?)




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#54688: 29.0.50; Sliced image in margin looks bad
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 03 Apr 2022 12:04:02 +0000
Resent-Message-ID: <handler.54688.B54688.1648987417944 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 54688
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: dalanicolai <dalanicolai@HIDDEN>
Cc: 54688 <at> debbugs.gnu.org
Received: via spool by 54688-submit <at> debbugs.gnu.org id=B54688.1648987417944
          (code B ref 54688); Sun, 03 Apr 2022 12:04:02 +0000
Received: (at 54688) by debbugs.gnu.org; 3 Apr 2022 12:03:37 +0000
Received: from localhost ([127.0.0.1]:47826 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nayxF-0000FA-Lg
	for submit <at> debbugs.gnu.org; Sun, 03 Apr 2022 08:03:37 -0400
Received: from eggs.gnu.org ([209.51.188.92]:34150)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1nayxD-0000Ew-02
 for 54688 <at> debbugs.gnu.org; Sun, 03 Apr 2022 08:03:35 -0400
Received: from [2001:470:142:3::e] (port=35094 helo=fencepost.gnu.org)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1nayx5-0003Ea-N5; Sun, 03 Apr 2022 08:03:29 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=ax3T0O5BZQ9+PM05aPbmCRte4+r3xEGBZdbDjXWEq28=; b=HOrDzC0kHNFy
 yOpoeagztlL4yj8ooptVZzvbs9rsycC24qiYk03U/hfmbmpZKsrGdD/UQTeal43yLizcTWYx7s1Qn
 8XO3/XrK7R5KmpjifdYlI6psclSMERu0FfJeP8H2vUhrx8HRkzADrlPYKcUX+npKYlxpgkrmM2lbe
 /SXNHYxNe7RHt6p6t3z0g4JifKyNaOkGfklehA63I0/Ynjs0ERdDkkExubd+6gJOk8D/acHh8Jg9S
 2SoqdT/NtzY3d7zmKtXxT03Fn29eR7VoMRBtHuX0+DoCdxz/O/pIbh+qzdyfJbY8f2i8zE+iLvWrN
 Ud31159/MY11hhZ0x8uwGg==;
Received: from [87.69.77.57] (port=1242 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1nayx5-0002QH-2F; Sun, 03 Apr 2022 08:03:27 -0400
Date: Sun, 03 Apr 2022 15:03:27 +0300
Message-Id: <83sfqu2x2o.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <CACJP=3nMwwxjjhC1WCuqeXLVAR7c9=0ntqm-uRfAw5+CL_TzjQ@HIDDEN>
 (message from dalanicolai on Sun, 3 Apr 2022 13:03:27 +0200)
References: <CACJP=3=U8oFrS8Gk8+nfCNrm+Avp_irXnrwZix5gra6Xn=3j+A@HIDDEN>
 <83zgl235pb.fsf@HIDDEN>
 <CACJP=3kEBQ-V=ZmjyUkaTzc8B4X=3ab7DnTD6CUij6NtG5O01A@HIDDEN>
 <83v8vq30aa.fsf@HIDDEN>
 <CACJP=3nMwwxjjhC1WCuqeXLVAR7c9=0ntqm-uRfAw5+CL_TzjQ@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: dalanicolai <dalanicolai@HIDDEN>
> Date: Sun, 3 Apr 2022 13:03:27 +0200
> Cc: 54688 <at> debbugs.gnu.org
> 
> Playing around with :ascent, makes possible to keep the line-pixel-height fixed.
> 
> So in the following I simply use `insert-image`. Without the :ascent, the
> 'line-pixel-height' increases when inserting another character. With the
> :ascent it is possible to reduce this 'increase'. For me the increase is 0
> when I use an ascent value of 80.
> (below the used code)
> 
> (with-current-buffer (get-buffer-create "test")
>   (setq left-margin-width 5)
>   (insert-image (svg-image (let* ((ph (line-pixel-height))
>                                   (size ph)
>                                   (svg (svg-create size size)))
>                              (svg-circle svg ph ph ph :fill "red")
>                              svg)
>                            :ascent 80))
>   (switch-to-buffer (current-buffer)))

Does this mean the problem is solved, and we can close this bug?




Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 3 Apr 2022 12:15:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 03 08:15:59 2022
Received: from localhost ([127.0.0.1]:47869 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1naz9D-0001Y5-AK
	for submit <at> debbugs.gnu.org; Sun, 03 Apr 2022 08:15:59 -0400
Received: from quimby.gnus.org ([95.216.78.240]:60356)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1naz9C-0001S6-E9
 for control <at> debbugs.gnu.org; Sun, 03 Apr 2022 08:15:58 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=aIGAO7NO6IrGjrs69X5EdntM4QFpyymn7AMKHEfAvec=; b=toIE6dKtc/00mZk8lmta2DBDx1
 07fx7Mzm0391BJXNTyK/gbyK6g0MagIYfz81S+TehWqR5HsQNxP0tY6zyJmQfc+5XoCOwd8Y0QAnf
 +HwACZgA9Ulsk5wNb0uCVLb/ELj3HNGI+o0MWmE2WtabzxLl8hBtf+T9Un46HugthTzk=;
Received: from [84.212.220.105] (helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>) id 1naz94-0007a0-S1
 for control <at> debbugs.gnu.org; Sun, 03 Apr 2022 14:15:52 +0200
Date: Sun, 03 Apr 2022 14:15:50 +0200
Message-Id: <875ynqjrbd.fsf@HIDDEN>
To: control <at> debbugs.gnu.org
From: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: control message for bug #54688
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  tags 54688 + moreinfo quit 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

tags 54688 + moreinfo
quit





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#54688: 29.0.50; Sliced image in margin looks bad
Resent-From: dalanicolai <dalanicolai@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 03 Apr 2022 13:07:02 +0000
Resent-Message-ID: <handler.54688.B54688.164899116423794 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 54688
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: moreinfo
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 54688 <at> debbugs.gnu.org
Received: via spool by 54688-submit <at> debbugs.gnu.org id=B54688.164899116423794
          (code B ref 54688); Sun, 03 Apr 2022 13:07:02 +0000
Received: (at 54688) by debbugs.gnu.org; 3 Apr 2022 13:06:04 +0000
Received: from localhost ([127.0.0.1]:47993 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nazvf-0006Bi-Is
	for submit <at> debbugs.gnu.org; Sun, 03 Apr 2022 09:06:03 -0400
Received: from mail-yb1-f173.google.com ([209.85.219.173]:34600)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dalanicolai@HIDDEN>) id 1nazvd-0006BC-8Y
 for 54688 <at> debbugs.gnu.org; Sun, 03 Apr 2022 09:06:01 -0400
Received: by mail-yb1-f173.google.com with SMTP id g9so13100606ybf.1
 for <54688 <at> debbugs.gnu.org>; Sun, 03 Apr 2022 06:06:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=7hzcuvqTktlQ/fFA2znlIyDpUE7LKwkIjzElz4nFUx8=;
 b=GYqkIpsFvRcxPbZxsMuMWJJPD2GbYaQXqv29IQq73PT/8jrvUebbeMuL6vsJPjolf4
 WyMpsW3F5ozvcJrDd5z4whAWo/KnCP+9oluQSzIAW2ns+RnVXFiBwMsUF0wHPdTsknMm
 LeVTM/PLICwRb3OjbiWotRj71SLU07I7KUyhDT48PuW9vndP78JdjBNVB9NY6RkczbJT
 7qJy5WiZe7GWy002SfGE2wWcBFhAz7eDJEMd/aZGXpzlJBlQ+G7We7HXniw5Z54zS0oS
 /PNF5T8st/M2/XNjmj6OvSKmWtlIAxPP+OqShXMDyflZ01zs6aR8+p3+YysirQWE38UX
 8smA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=7hzcuvqTktlQ/fFA2znlIyDpUE7LKwkIjzElz4nFUx8=;
 b=n/v9Rn2Y8U1EFzRFKO4ZkA2rixa5uw46eYvnxB62DYwEsD2Esx4dMEEh1o88HpIuZU
 gvmgLeLsYU58cePS+qFNHEn+lECFYUO5EMlDyVQAjA5mzcybSkAhy+bOtEOQ+YV3nl+S
 1gOHh6pZmnz3jBw1cF0mNyUlKkfvMtoLQIFrxjrCvj1QF9RLMy71SC/neBDOaQbUpg+s
 TU7ZmlXLihkZhtKXbYNXAr3+wj6IT5/7bDb+EpKz/72BtLD82d08FAdfoPEUb6UaIIVp
 WgEBpLICU4XCtez9h+swyXTFy1ZR21H/rdYcwoZmrMdLDOjx4RkHB7OYFF4FsY2HTaut
 MIEA==
X-Gm-Message-State: AOAM530n8xRbI+6Nwwtc/wLz2GcqeqirI6CMh7mikwDgzbfQ4wdyyPng
 oe6VAj3Vim+JDqX3zIuJ8Ev0use0/35Fw0LKSoIZVICLMHXk0Q==
X-Google-Smtp-Source: ABdhPJw6ZaKNqpL2r5LDxcGZ3Gxh/8NIG6Ml9nJ3NmKkR7Gu5ZEKUZmr0qNif399qzouY2mg9zuiVQdp8DaiB3sYSNk=
X-Received: by 2002:a25:2fcf:0:b0:63d:9aa5:934c with SMTP id
 v198-20020a252fcf000000b0063d9aa5934cmr5147470ybv.488.1648991155605; Sun, 03
 Apr 2022 06:05:55 -0700 (PDT)
MIME-Version: 1.0
References: <CACJP=3=U8oFrS8Gk8+nfCNrm+Avp_irXnrwZix5gra6Xn=3j+A@HIDDEN>
 <83zgl235pb.fsf@HIDDEN>
 <CACJP=3kEBQ-V=ZmjyUkaTzc8B4X=3ab7DnTD6CUij6NtG5O01A@HIDDEN>
 <83v8vq30aa.fsf@HIDDEN>
 <CACJP=3nMwwxjjhC1WCuqeXLVAR7c9=0ntqm-uRfAw5+CL_TzjQ@HIDDEN>
 <83sfqu2x2o.fsf@HIDDEN>
In-Reply-To: <83sfqu2x2o.fsf@HIDDEN>
From: dalanicolai <dalanicolai@HIDDEN>
Date: Sun, 3 Apr 2022 15:05:44 +0200
Message-ID: <CACJP=3nXLTvD-tQr9a4VH-QU847F3hxg3jkmeAJuB=McijjX5A@HIDDEN>
Content-Type: multipart/alternative; boundary="00000000000011536205dbbfac8d"
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--00000000000011536205dbbfac8d
Content-Type: text/plain; charset="UTF-8"

>
> Does this mean the problem is solved, and we can close this bug?


I am not sure. It depends on what is the intended behavior. I would say it
is desirable
if inserting text after an image, of height equal to the text height, would
not increase
the `line-pixel-height`. The elisp manual
<https://www.gnu.org/software/emacs/manual/html_node/elisp/Image-Descriptors.html>
mentions that the default value for :ascent is
50, in which case the `line-pixel-height` is larger than the both the
'image height' and
the 'text height'. So maybe the default value of :ascent should be 80, in
which case
the 'line-pixel-height' 'remains' equal to the image height and text height.

However, there might be various arguments for the current default value of
50 (and its
behavior of increasing the 'line-pixel'height' when combining images with
text on a
single line).

> I would think that this :ascent of 80, behaves how :ascent 50 (the
> default)
> > is supposed to behave?
>
> I don't think I understand the question.
>

I mean that I would expect the default behavior to be that, when combining
images and
text of equal height on a single line, the 'line-pixel-height' would also
be/stay of equal
height.
But as mentioned before, there might be various arguments for the current
behavior,
however (as a layman) I am not aware of any.

If the current behavior is the desired behavior, then indeed this issue can
be closed.

On Sun, 3 Apr 2022 at 14:03, Eli Zaretskii <eliz@HIDDEN> wrote:

> > From: dalanicolai <dalanicolai@HIDDEN>
> > Date: Sun, 3 Apr 2022 13:03:27 +0200
> > Cc: 54688 <at> debbugs.gnu.org
> >
> > Playing around with :ascent, makes possible to keep the
> line-pixel-height fixed.
> >
> > So in the following I simply use `insert-image`. Without the :ascent, the
> > 'line-pixel-height' increases when inserting another character. With the
> > :ascent it is possible to reduce this 'increase'. For me the increase is
> 0
> > when I use an ascent value of 80.
> > (below the used code)
> >
> > (with-current-buffer (get-buffer-create "test")
> >   (setq left-margin-width 5)
> >   (insert-image (svg-image (let* ((ph (line-pixel-height))
> >                                   (size ph)
> >                                   (svg (svg-create size size)))
> >                              (svg-circle svg ph ph ph :fill "red")
> >                              svg)
> >                            :ascent 80))
> >   (switch-to-buffer (current-buffer)))
>
> Does this mean the problem is solved, and we can close this bug?
>

--00000000000011536205dbbfac8d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px =
0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Does thi=
s mean the problem is solved, and we can close this bug?</blockquote><div><=
br></div><div>I am not sure. It depends on what is the intended behavior. I=
 would say it is desirable</div><div>if inserting text after an image, of h=
eight equal to the text height, would not increase</div><div>the `line-pixe=
l-height`. The <a href=3D"https://www.gnu.org/software/emacs/manual/html_no=
de/elisp/Image-Descriptors.html">elisp manual</a> mentions that the default=
 value for :ascent is</div><div>50, in which case the `line-pixel-height` i=
s larger than the both the &#39;image height&#39; and</div><div>the &#39;te=
xt height&#39;. So maybe the default value of :ascent should be 80, in whic=
h case</div><div>the &#39;line-pixel-height&#39; &#39;remains&#39; equal to=
 the image height and text height.</div><div><br></div><div>However, there =
might be various arguments for the current default value of 50 (and its</di=
v><div>behavior of increasing the &#39;line-pixel&#39;height&#39; when comb=
ining images with text on a</div><div>single line).</div><div><br></div><bl=
ockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-lef=
t:1px solid rgb(204,204,204);padding-left:1ex"><div><span class=3D"gmail-im=
">&gt; I would think that this :ascent of 80, behaves how :ascent 50 (the d=
efault)<br>
&gt; is supposed to behave?<br>
<br></span>
I don&#39;t think I understand the question.</div></blockquote><div><br></d=
iv><div>I mean that I would expect the default behavior to be that, when co=
mbining images and</div><div>text of equal height on a single line, the &#3=
9;line-pixel-height&#39; would also be/stay of equal</div><div>height.</div=
><div>But as mentioned before, there might be various arguments for the cur=
rent behavior,</div><div>however (as a layman) I am not aware of any.</div>=
<div><br></div><div>If the current behavior is the desired behavior, then i=
ndeed this issue can be closed.<br></div></div><br><div class=3D"gmail_quot=
e"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, 3 Apr 2022 at 14:03, Eli Z=
aretskii &lt;<a href=3D"mailto:eliz@HIDDEN">eliz@HIDDEN</a>&gt; wrote:<br=
></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;=
border-left:1px solid rgb(204,204,204);padding-left:1ex">&gt; From: dalanic=
olai &lt;<a href=3D"mailto:dalanicolai@HIDDEN" target=3D"_blank">dalanic=
olai@HIDDEN</a>&gt;<br>
&gt; Date: Sun, 3 Apr 2022 13:03:27 +0200<br>
&gt; Cc: <a href=3D"mailto:54688 <at> debbugs.gnu.org" target=3D"_blank">54688@d=
ebbugs.gnu.org</a><br>
&gt; <br>
&gt; Playing around with :ascent, makes possible to keep the line-pixel-hei=
ght fixed.<br>
&gt; <br>
&gt; So in the following I simply use `insert-image`. Without the :ascent, =
the<br>
&gt; &#39;line-pixel-height&#39; increases when inserting another character=
. With the<br>
&gt; :ascent it is possible to reduce this &#39;increase&#39;. For me the i=
ncrease is 0<br>
&gt; when I use an ascent value of 80.<br>
&gt; (below the used code)<br>
&gt; <br>
&gt; (with-current-buffer (get-buffer-create &quot;test&quot;)<br>
&gt;=C2=A0 =C2=A0(setq left-margin-width 5)<br>
&gt;=C2=A0 =C2=A0(insert-image (svg-image (let* ((ph (line-pixel-height))<b=
r>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(size ph)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(svg (svg-create siz=
e size)))<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (svg-circle svg ph ph ph :fill &quot;red=
&quot;)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 svg)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 :ascent 80))<br>
&gt;=C2=A0 =C2=A0(switch-to-buffer (current-buffer)))<br>
<br>
Does this mean the problem is solved, and we can close this bug?<br>
</blockquote></div>

--00000000000011536205dbbfac8d--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#54688: 29.0.50; Sliced image in margin looks bad
Resent-From: dalanicolai <dalanicolai@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 03 Apr 2022 13:11:02 +0000
Resent-Message-ID: <handler.54688.B54688.164899141824199 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 54688
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: moreinfo
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 54688 <at> debbugs.gnu.org
Received: via spool by 54688-submit <at> debbugs.gnu.org id=B54688.164899141824199
          (code B ref 54688); Sun, 03 Apr 2022 13:11:02 +0000
Received: (at 54688) by debbugs.gnu.org; 3 Apr 2022 13:10:18 +0000
Received: from localhost ([127.0.0.1]:48005 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nazzl-0006IF-Ix
	for submit <at> debbugs.gnu.org; Sun, 03 Apr 2022 09:10:18 -0400
Received: from mail-yw1-f177.google.com ([209.85.128.177]:36591)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dalanicolai@HIDDEN>) id 1nazzk-0006Hx-9S
 for 54688 <at> debbugs.gnu.org; Sun, 03 Apr 2022 09:10:16 -0400
Received: by mail-yw1-f177.google.com with SMTP id
 00721157ae682-2e64a6b20eeso74265607b3.3
 for <54688 <at> debbugs.gnu.org>; Sun, 03 Apr 2022 06:10:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=hviCJxDLFQiyPt70UlxeAU5aasgp4brQeht7TWjU6Dk=;
 b=cEpqkw2OG7u5V84vJR4abxOArN8zWWz1yR9fYy9Eg6m+LnqmzkAgTMZFU9yPzVZCSa
 LyXdx5M1MNYX6DAoznRBL5GfmykS6SieH28NN9c5e10fE5Fw6wiSXOZR91nQQztmpF2g
 76W+92jTsmHMpo+c+jj5Gr0lbrvX9tSL7ivpG977AD3oDgG4UuPRZRECIHHrs2byQ28O
 j8YfnrVK5WERcju96UJXoAILhJ0pGlSvDLdJlPPk87ROp3UtX3NlkCUpwEGLrnMP5KfQ
 ESE8Ec3SlLGm3AjuRp0mN2GVL5795w0aSdrFaG7ZNYxUaQv1Boie95CtrYVXA/GlWqgt
 rqGQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=hviCJxDLFQiyPt70UlxeAU5aasgp4brQeht7TWjU6Dk=;
 b=r9BaS5NppDHxUHsb/ETYqKe/ef2jPkH69oKWXatoOYpv73UdFI3eBpNsoYYa89OKYh
 WdCAcP7oClfOe6ytMT+m17kmK5V0RmyZV8wGJzUtq0vlUTksPQuWy15vdPsEWkxqZ/u4
 mnDSkY8qQDfTVimDM1sUegeJt4E5D3+m4y+P/q71zlx/NFRsL+3oVtUz+ch0gFV/uS47
 4ny8BSqJln23zg/9hgo89ZuV9FTd5MkehAW+/2eImyzQ+KZdHK9ayWtbaXRgYc0Rfe7r
 5+OGLsCevIQ+gpk+A0FfbhJzqXmiZgevX8O+/32C5kpauvpRLCwNGMZCu84y5W7jEFNZ
 nPKw==
X-Gm-Message-State: AOAM531HlYcR68mbq6kwOEO+dcb7WEOVRUjWW2ASBbhplaMeXD7yAceo
 j7CKHY+qnyJjKI7GdrqYSr/3+NoqCp4a6xjqpwASHV4QsuU=
X-Google-Smtp-Source: ABdhPJwEFFxqoShXf3vqCeDthZpJMtIReGEkYY1xmNdmt5fsjW9ZWsLKwMH6JkjQ+BC3oDsFk719HMeWPjcVbk+mB+s=
X-Received: by 2002:a81:1097:0:b0:2eb:4639:24f3 with SMTP id
 145-20020a811097000000b002eb463924f3mr4917799ywq.423.1648991410908; Sun, 03
 Apr 2022 06:10:10 -0700 (PDT)
MIME-Version: 1.0
References: <CACJP=3=U8oFrS8Gk8+nfCNrm+Avp_irXnrwZix5gra6Xn=3j+A@HIDDEN>
 <83zgl235pb.fsf@HIDDEN>
 <CACJP=3kEBQ-V=ZmjyUkaTzc8B4X=3ab7DnTD6CUij6NtG5O01A@HIDDEN>
 <83v8vq30aa.fsf@HIDDEN>
 <CACJP=3nMwwxjjhC1WCuqeXLVAR7c9=0ntqm-uRfAw5+CL_TzjQ@HIDDEN>
 <83sfqu2x2o.fsf@HIDDEN>
 <CACJP=3nXLTvD-tQr9a4VH-QU847F3hxg3jkmeAJuB=McijjX5A@HIDDEN>
In-Reply-To: <CACJP=3nXLTvD-tQr9a4VH-QU847F3hxg3jkmeAJuB=McijjX5A@HIDDEN>
From: dalanicolai <dalanicolai@HIDDEN>
Date: Sun, 3 Apr 2022 15:09:59 +0200
Message-ID: <CACJP=3maME+QWWN7DQKAEe0801XLrJjXB1VMraKkufxdp5gvgg@HIDDEN>
Content-Type: multipart/alternative; boundary="00000000000048efc605dbbfbb49"
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--00000000000048efc605dbbfbb49
Content-Type: text/plain; charset="UTF-8"

In the first sentence, I mean text of the same height as the image height.
When I say 'current behavior' I mean that the 'line-pixel-height' when
combining
images and text of equal height on a single line, is larger than the
text/image height.

On Sun, 3 Apr 2022 at 15:05, dalanicolai <dalanicolai@HIDDEN> wrote:

> Does this mean the problem is solved, and we can close this bug?
>
>
> I am not sure. It depends on what is the intended behavior. I would say it
> is desirable
> if inserting text after an image, of height equal to the text height,
> would not increase
> the `line-pixel-height`. The elisp manual
> <https://www.gnu.org/software/emacs/manual/html_node/elisp/Image-Descriptors.html>
> mentions that the default value for :ascent is
> 50, in which case the `line-pixel-height` is larger than the both the
> 'image height' and
> the 'text height'. So maybe the default value of :ascent should be 80, in
> which case
> the 'line-pixel-height' 'remains' equal to the image height and text
> height.
>
> However, there might be various arguments for the current default value of
> 50 (and its
> behavior of increasing the 'line-pixel'height' when combining images with
> text on a
> single line).
>
> > I would think that this :ascent of 80, behaves how :ascent 50 (the
>> default)
>> > is supposed to behave?
>>
>> I don't think I understand the question.
>>
>
> I mean that I would expect the default behavior to be that, when combining
> images and
> text of equal height on a single line, the 'line-pixel-height' would also
> be/stay of equal
> height.
> But as mentioned before, there might be various arguments for the current
> behavior,
> however (as a layman) I am not aware of any.
>
> If the current behavior is the desired behavior, then indeed this issue
> can be closed.
>
> On Sun, 3 Apr 2022 at 14:03, Eli Zaretskii <eliz@HIDDEN> wrote:
>
>> > From: dalanicolai <dalanicolai@HIDDEN>
>> > Date: Sun, 3 Apr 2022 13:03:27 +0200
>> > Cc: 54688 <at> debbugs.gnu.org
>> >
>> > Playing around with :ascent, makes possible to keep the
>> line-pixel-height fixed.
>> >
>> > So in the following I simply use `insert-image`. Without the :ascent,
>> the
>> > 'line-pixel-height' increases when inserting another character. With the
>> > :ascent it is possible to reduce this 'increase'. For me the increase
>> is 0
>> > when I use an ascent value of 80.
>> > (below the used code)
>> >
>> > (with-current-buffer (get-buffer-create "test")
>> >   (setq left-margin-width 5)
>> >   (insert-image (svg-image (let* ((ph (line-pixel-height))
>> >                                   (size ph)
>> >                                   (svg (svg-create size size)))
>> >                              (svg-circle svg ph ph ph :fill "red")
>> >                              svg)
>> >                            :ascent 80))
>> >   (switch-to-buffer (current-buffer)))
>>
>> Does this mean the problem is solved, and we can close this bug?
>>
>

--00000000000048efc605dbbfbb49
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>In the first sentence, I mean text of the same height=
 as the image height.</div><div>When I say &#39;current behavior&#39; I mea=
n that the &#39;line-pixel-height&#39; when combining</div><div>images and =
text of equal height on a single line, is larger than the text/image height=
.<br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"g=
mail_attr">On Sun, 3 Apr 2022 at 15:05, dalanicolai &lt;<a href=3D"mailto:d=
alanicolai@HIDDEN">dalanicolai@HIDDEN</a>&gt; wrote:<br></div><blockq=
uote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1p=
x solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid =
rgb(204,204,204);padding-left:1ex">Does this mean the problem is solved, an=
d we can close this bug?</blockquote><div><br></div><div>I am not sure. It =
depends on what is the intended behavior. I would say it is desirable</div>=
<div>if inserting text after an image, of height equal to the text height, =
would not increase</div><div>the `line-pixel-height`. The <a href=3D"https:=
//www.gnu.org/software/emacs/manual/html_node/elisp/Image-Descriptors.html"=
 target=3D"_blank">elisp manual</a> mentions that the default value for :as=
cent is</div><div>50, in which case the `line-pixel-height` is larger than =
the both the &#39;image height&#39; and</div><div>the &#39;text height&#39;=
. So maybe the default value of :ascent should be 80, in which case</div><d=
iv>the &#39;line-pixel-height&#39; &#39;remains&#39; equal to the image hei=
ght and text height.</div><div><br></div><div>However, there might be vario=
us arguments for the current default value of 50 (and its</div><div>behavio=
r of increasing the &#39;line-pixel&#39;height&#39; when combining images w=
ith text on a</div><div>single line).</div><div><br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg=
b(204,204,204);padding-left:1ex"><div><span>&gt; I would think that this :a=
scent of 80, behaves how :ascent 50 (the default)<br>
&gt; is supposed to behave?<br>
<br></span>
I don&#39;t think I understand the question.</div></blockquote><div><br></d=
iv><div>I mean that I would expect the default behavior to be that, when co=
mbining images and</div><div>text of equal height on a single line, the &#3=
9;line-pixel-height&#39; would also be/stay of equal</div><div>height.</div=
><div>But as mentioned before, there might be various arguments for the cur=
rent behavior,</div><div>however (as a layman) I am not aware of any.</div>=
<div><br></div><div>If the current behavior is the desired behavior, then i=
ndeed this issue can be closed.<br></div></div><br><div class=3D"gmail_quot=
e"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, 3 Apr 2022 at 14:03, Eli Z=
aretskii &lt;<a href=3D"mailto:eliz@HIDDEN" target=3D"_blank">eliz@HIDDEN=
</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:=
0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">=
&gt; From: dalanicolai &lt;<a href=3D"mailto:dalanicolai@HIDDEN" target=
=3D"_blank">dalanicolai@HIDDEN</a>&gt;<br>
&gt; Date: Sun, 3 Apr 2022 13:03:27 +0200<br>
&gt; Cc: <a href=3D"mailto:54688 <at> debbugs.gnu.org" target=3D"_blank">54688@d=
ebbugs.gnu.org</a><br>
&gt; <br>
&gt; Playing around with :ascent, makes possible to keep the line-pixel-hei=
ght fixed.<br>
&gt; <br>
&gt; So in the following I simply use `insert-image`. Without the :ascent, =
the<br>
&gt; &#39;line-pixel-height&#39; increases when inserting another character=
. With the<br>
&gt; :ascent it is possible to reduce this &#39;increase&#39;. For me the i=
ncrease is 0<br>
&gt; when I use an ascent value of 80.<br>
&gt; (below the used code)<br>
&gt; <br>
&gt; (with-current-buffer (get-buffer-create &quot;test&quot;)<br>
&gt;=C2=A0 =C2=A0(setq left-margin-width 5)<br>
&gt;=C2=A0 =C2=A0(insert-image (svg-image (let* ((ph (line-pixel-height))<b=
r>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(size ph)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(svg (svg-create siz=
e size)))<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (svg-circle svg ph ph ph :fill &quot;red=
&quot;)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 svg)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 :ascent 80))<br>
&gt;=C2=A0 =C2=A0(switch-to-buffer (current-buffer)))<br>
<br>
Does this mean the problem is solved, and we can close this bug?<br>
</blockquote></div>
</blockquote></div>

--00000000000048efc605dbbfbb49--




Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 2 May 2022 08:43:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 02 04:43:27 2022
Received: from localhost ([127.0.0.1]:34776 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nlReR-0000Je-Ee
	for submit <at> debbugs.gnu.org; Mon, 02 May 2022 04:43:27 -0400
Received: from quimby.gnus.org ([95.216.78.240]:40498)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1nlReP-0000JP-A7
 for control <at> debbugs.gnu.org; Mon, 02 May 2022 04:43:25 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=/1+NsfMB5RP0D6vTcimeF5mSEOCGb+WFjo9IoCXHOJg=; b=TgeCe7ON8iM4zbZgloSt8G1YFB
 rOZjhb70ccN0qNHF+T/n693xtYU7C58FegtxSrvfeTLTw7c4n9JLmggzz/5vqEHUVUFKfvtsqohPM
 t8R2tGcwt0fraJaO1X6Ldp7mefeE+VmM6JLkYZrtg/Z4IUuRokJqq9Iy99kXvawx37oY=;
Received: from [84.212.220.105] (helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>) id 1nlReH-00079A-Og
 for control <at> debbugs.gnu.org; Mon, 02 May 2022 10:43:19 +0200
Date: Mon, 02 May 2022 10:43:17 +0200
Message-Id: <87v8uo8guy.fsf@HIDDEN>
To: control <at> debbugs.gnu.org
From: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: control message for bug #54688
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  tags 54688 - moreinfo quit 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

tags 54688 - moreinfo
quit






Last modified: Mon, 2 May 2022 08:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.