emacs-devel
[Top][All Lists]
Advanced

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

Re: Tick Reduction


From: Lars Ingebrigtsen
Subject: Re: Tick Reduction
Date: Sun, 21 Nov 2021 21:28:27 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> This is a 'display' text property, right?  It is placed on text;
> instead of that text Emacs will display a stretch glyph (white space)
> whose width is calculated as the pixel width of the first character
> "covered" by the property multiplied by FACTOR.

(shr-string-pixel-width
 (propertize "칹a" 'display '(space :relative-width 1)))
=> 22

(shr-string-pixel-width
 (propertize "a칹" 'display '(space :relative-width 1)))
=> 22

The first one should be a lot wider than the second, but I seem to be
getting the exact same width no matter what I do?

The only in-tree usage is this:

(defconst org-table-separator-space
  (propertize " " 'display '(space :relative-width 1))

And that's concat-ed with other bits.

(let ((start (point)))
  (insert "칹a")
  (put-text-property start (point) 'display '(space :relative-width 1)))

seems to give the same results...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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