bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#52599: 29.0.50; Unproportional Unicode character scale in SVG overla


From: Matsievskiy S.V.
Subject: bug#52599: 29.0.50; Unproportional Unicode character scale in SVG overlay
Date: Sat, 18 Dec 2021 14:50:41 +0300
User-agent: Evolution 3.42.2-1

When buffer contains SVG overlay with Unicode characters, changing font
size via `text-scale-increase` and `text-scale-decrease` causes these
Unicode characters to change size unproportionally to the Latin
characters. Their size changes faster: they shrink faster then Latin
characters and they grow faster then Latin characters.
Example of the math equation containing Unicode characters with
different scale is showin in picture https://imgur.com/3Ul8i74.

Way to reproduce:
1. In a new buffer insert some text
  ```
  1234567890
  ```
2. Add SVG overlay by evaluating command (Alt+Shift+:)
  ```elisp
  (let ((o (make-overlay 0 11)))
  (overlay-put o 'display
               (list (cons 'image
                           (list :type 'svg
                                 :data "<svg
xmlns:xlink=\"http://www.w3.org/1999/xlink\"; width=\"15.639ex\"
height=\"5.343ex\" style=\"vertical-align: -2.171ex;\" viewBox=\"0 -
1365.4 6733.3 2300.3\" role=\"img\" focusable=\"false\"
xmlns=\"http://www.w3.org/2000/svg\"; aria-labelledby=\"MathJax-SVG-1-
Title\">
<title id=\"MathJax-SVG-1-
Title\">\\newcommand{textup}[1]{#1}x^a_b\\quad
x^б_ю\\quad\\frac{a}{а}\\quad\\frac{a}{Ì}</title>
<defs aria-hidden=\"true\">
<path stroke-width=\"1\" id=\"E1-MJMATHI-78\" d=\"M52 289Q59 331 106
386T222 442Q257 442 286 424T329 379Q371 442 430 442Q467 442 494 420T522
361Q522 332 508 314T481 292T458 288Q439 288 427 299T415 328Q415 374 465
391Q454 404 425 404Q412 404 406 402Q368 386 350 336Q290 115 290 78Q290
50 306 38T341 26Q378 26 414 59T463 140Q466 150 469 151T485 153H489Q504
153 504 145Q504 144 502 134Q486 77 440 33T333 -11Q263 -11 227 52Q186 -
10 133 -10H127Q78 -10 57 16T35 71Q35 103 54 123T99 143Q142 143 142
101Q142 81 130 66T107 46T94 41L91 40Q91 39 97 36T113 29T132 26Q168 26
194 71Q203 87 217 139T245 247T261 313Q266 340 266 352Q266 380 251
392T217 404Q177 404 142 372T93 290Q91 281 88 280T72 278H58Q52 284 52
289Z\"></path>
<path stroke-width=\"1\" id=\"E1-MJMATHI-61\" d=\"M33 157Q33 258 109
349T280 441Q331 441 370 392Q386 422 416 422Q429 422 439 414T449 394Q449
381 412 234T374 68Q374 43 381 35T402 26Q411 27 422 35Q443 55 463
131Q469 151 473 152Q475 153 483 153H487Q506 153 506 144Q506 138 501
117T481 63T449 13Q436 0 417 -8Q409 -10 393 -10Q359 -10 336 5T306 36L300
51Q299 52 296 50Q294 48 292 46Q233 -10 172 -10Q117 -10 75 30T33
157ZM351 328Q351 334 346 350T323 385T277 405Q242 405 210 374T160
293Q131 214 119 129Q119 126 119 118T118 106Q118 61 136 44T179 26Q217 26
254 59T298 110Q300 114 325 217T351 328Z\"></path>
<path stroke-width=\"1\" id=\"E1-MJMATHI-62\" d=\"M73 647Q73 657 77
670T89 683Q90 683 161 688T234 694Q246 694 246 685T212 542Q204 508 195
472T180 418L176 399Q176 396 182 402Q231 442 283 442Q345 442 383 396T422
280Q422 169 343 79T173 -11Q123 -11 82 27T40 150V159Q40 180 48 217T97
414Q147 611 147 623T109 637Q104 637 101 637H96Q86 637 83 637T76 640T73
647ZM336 325V331Q336 405 275 405Q258 405 240 397T207 376T181 352T163
330L157 322L136 236Q114 150 114 114Q114 66 138 42Q154 26 178 26Q211 26
245 58Q270 81 285 114T318 219Q336 291 336 325Z\"></path>
</defs>
<g stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\"
transform=\"matrix(1 0 0 -1 0 0)\" aria-hidden=\"true\">
 <use xlink:href=\"#E1-MJMATHI-78\" x=\"0\" y=\"0\"></use>
 <use transform=\"scale(0.707)\" xlink:href=\"#E1-MJMATHI-61\"
x=\"809\" y=\"498\"></use>
 <use transform=\"scale(0.707)\" xlink:href=\"#E1-MJMATHI-62\"
x=\"809\" y=\"-463\"></use>
<g transform=\"translate(2046,0)\">
 <use xlink:href=\"#E1-MJMATHI-78\" x=\"0\" y=\"0\"></use>
<g transform=\"translate(572,648)\">
<text font-family=\"monospace\" stroke=\"none\"
transform=\"scale(50.74127551116547) matrix(1 0 0 -1 0 0)\">б</text>
</g>
<g transform=\"translate(572,-445)\">
<text font-family=\"monospace\" stroke=\"none\"
transform=\"scale(50.74127551116547) matrix(1 0 0 -1 0 0)\">ю</text>
</g>
</g>
<g transform=\"translate(4150,0)\">
<g transform=\"translate(120,0)\">
<rect stroke=\"none\" width=\"551\" height=\"60\" x=\"0\"
y=\"220\"></rect>
 <use transform=\"scale(0.707)\" xlink:href=\"#E1-MJMATHI-61\"
x=\"125\" y=\"639\"></use>
<g transform=\"translate(60,-554)\">
<text font-family=\"monospace\" stroke=\"none\"
transform=\"scale(50.74127551116547) matrix(1 0 0 -1 0 0)\">а</text>
</g>
</g>
</g>
<g transform=\"translate(5942,0)\">
<g transform=\"translate(120,0)\">
<rect stroke=\"none\" width=\"551\" height=\"60\" x=\"0\"
y=\"220\"></rect>
 <use transform=\"scale(0.707)\" xlink:href=\"#E1-MJMATHI-61\"
x=\"125\" y=\"639\"></use>
<g transform=\"translate(60,-554)\">
<text font-family=\"monospace\" stroke=\"none\"
transform=\"scale(50.74127551116547) matrix(1 0 0 -1 0 0)\">Ì</text>
</g>
</g>
</g>
</g>
</svg>")))))
  ```
3. Change font size calling functions `text-scale-increase` and
`text-scale-decrease` repeatedly and observe unproportional size change

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.30, cairo version 1.16.0)
 of 2021-12-17 built on KILLINGMACHINE
Repository revision: cf33ece31016828ceeeee1154a4fc057957eefbc
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version
11.0.12013000
System Description: Debian GNU/Linux bookworm/sid

Configured using:
 'configure --prefix=/opt/emacs28 --with-all --with-xaw3d
 --with-xwidgets --with-imagemagick --with-native-compilation'

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

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

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-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:
/opt/emacs28/share/emacs/29.0.50/lisp/emacs-lisp/eieio-compat hides
/opt/emacs28/share/emacs/29.0.50/lisp/obsolete/eieio-compat

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media rmc puny
dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068
epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json map
text-property-search time-date seq gv subr-x byte-opt bytecomp
byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils 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
xwidget-internal dbusbind inotify lcms2 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 66356 11011)
 (symbols 48 6846 1)
 (strings 32 21253 3113)
 (string-bytes 1 764511)
 (vectors 16 14490)
 (vector-slots 8 275786 14211)
 (floats 8 26 103)
 (intervals 56 351 0)
 (buffers 992 13))

-- 
С Уважением,
С.В. Мациевский

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]